Other > Suggestions
Going prone with chat command.
Alvarez:
--- Quote from: Ghosthack on December 19, 2010, 01:52:48 pm ---This might be possible to implement, in any case, the fall sound will have to be disabled for this voluntary "knockdown", so it may need some changes in SDK first.
Other than that, it's not a bad idea.
--- End quote ---
Thank you for comment, Ghosthack. I appreciate it a lot.
Lizard:
Since Mr. Wipe had so nicely pointed me out to this thread, i might as well necrobumping it - for this, i humbly ask forum moderators for pardon.
So, how much scripting effort will this small feature might need?
What does speak for and what against the implementation of this feature?
Is this feature still desirable by the community and why?
z0m2h14:
It is something like that in client_main.fos
--- Code: --- if(message=="~sf")
{
RunServerScriptUnsafe("unsafe@unsafe_sleep", 1, 0, 0, "", null);
return false;
}
if(message=="~sb")
{
RunServerScriptUnsafe("unsafe@unsafe_sleep", 0, 0, 0, "", null);
return false;
}
--- End code ---
and this in some unsafe.fos
--- Code: ---void unsafe_sleep(Critter& player, int param0, int param1, int param2, string@ param3, int[]@ param4)
{
if(!valid(player)) return;
if (!player.IsDead() && !player.IsKnockout() && player.GetTimeEvents(CTE_SLEEP, null, null, null)==0)
{
player.StatBase[ST_CURRENT_AP]=-100000;
player.ToKnockout(KNOCKOUT_ANIM2_DEFAULT((param0==0)), 5, player.HexX, player.HexY);
player.Say(SAY_NETMSG, "You fall.");
player.AddTimeEvent("cte_sleep", 0, CTE_SLEEP, 0);
return;
}
else if (!player.IsDead() && player.IsKnockout() && player.GetTimeEvents(CTE_SLEEP, null, null, null)!=0)
{
player.StatBase[ST_CURRENT_AP]=0;
player.EraseTimeEvents(CTE_WARNING);
player.Say(SAY_NETMSG, "You rise.");
return;
}
}
uint cte_sleep(Critter& player, int identifier, uint& rate)
{
if(player.StatBase[ST_CURRENT_AP]>=-50000) player.StatBase[ST_CURRENT_AP]=-100000;
return 100;
}
--- End code ---
I made it for my RP russian server and so far it works fine. But we dont suffer from hackers or something like that, so i dont know if using unsafe scripts is much more less preferable for this server.
So for non-scripters:
~sf -drop you to ground in continious knockdown face down
~sb -same, but face up
Lizard:
If the forum had a "thank you" button, i'd push it, z0m2h14. So thank you for your effort!
Atom:
--- Quote from: z0m2h14 on February 13, 2012, 04:59:09 pm ---I made it for my RP russian server and so far it works fine. But we dont suffer from hackers or something like that, so i dont know if using unsafe scripts is much more less preferable for this server.
--- End quote ---
The only meaning of "unsafe script" is that there is no guarantee that the user input (the call itself and arguments passed to the function) will be legitimate. In theory, a hacker can invoke those functions with any parameters he wants, so you have to verify everything in the script. Consider an example where you write an unsafe script that's supposed to be invoked by a player on some critter he sees. You would pass that critter's id as an argument. But on the server side, you need to verify on your own that this critter is indeed seen by the issuing player, since in theory, he could send any number as this supposed id.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version