![]() |
Teleport stone - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Teleport stone (/Thread-Teleport-stone) |
Teleport stone - Volkinson - 12-22-2015 06:24 AM Hello everybody. I have trouble with script. Teleporting, part of script is not working correctly. It error come 50/50. Some time i have not, but other players can have it. Sphere 55b Here is code. Is all correct? Why after 5 sec i recieve Fail or no message at all... Biig thanks for any tips. Spoiler (Click to View) RE: Teleport stone - pointhz - 12-22-2015 07:43 AM how are you creating and equipping the item? I copy pasted your code and it works fine with me. RE: Teleport stone - Volkinson - 12-22-2015 11:04 AM (12-22-2015 07:43 AM)pointhz Wrote: how are you creating and equipping the item? No need to copy paste. You dont have first part of code. First part of code is using this part for recall to safe zone. I think i have problem with checking last rule "(<cont.findid.i_m_team>)". RE: Teleport stone - Coruja - 12-22-2015 11:33 AM the best way to check if any script is working, is debugging the script debug is a simple "visual" way to make the code return some readable info to you, and with this info will be much more easier to check if there's something wrong on the code. You can use SAY, SYSMESSAGE, SERV.B, etc Code: ON=@Timer RE: Teleport stone - Artyk - 12-22-2015 05:38 PM If you get no message at all maybe the condition for the first and the second IF are both false. Try placing a sysmessage on the else of the second if RE: Teleport stone - evening - 12-22-2015 05:51 PM [function aa] serv.newitem i_teleport_item new.timer = 1 new.equip <src> [ITEMDEF i_teleport_item] ID = i_memory TYPE = t_eq_script NAME = Teleport item ON=@equip morex = 5 ON=@Timer if (<cont.hits> < <cont.maxhits>) || (<cont.flags> & 020) || (<cont.flags> & 04)// || (<cont.findid.i_jail_item>) || (<cont.findid.i_m_team>) cont.sysmessage @55 Teleporting failed! remove return 1 endif if (<morex> > 0) morex -= 1 serv.log 1 else //cont.f_clear_mem cont.go cove remove //if (<tag0.delay> && <tag0.item_uid> ) //uid.<tag0.item_uid>.tag.delay = <eval <serv.time> + <tag0.delay> * 10> //endif endif timer = 0 return 1 |