![]() |
problem with logout script - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: problem with logout script (/Thread-problem-with-logout-script) |
problem with logout script - dabritmusic - 01-26-2014 07:37 AM im having trouble getting the player to logout and the new item bounced into their pack. anyone know exactly what im doing wrong? Code: [PLEVEL 1] RE: problem with logout script - Mordaunt - 01-26-2014 08:06 AM Why are you doing it this way? Why change how players log out? it will just annoy and not be used. Just add an event to all players like this: Code: on=@logout It could be way smaller than this also honestly given how you are seemingly tiling your offline players, which honestly won't help anything either. RE: problem with logout script - XuN - 01-26-2014 08:25 AM IF <SRC.TAG.LOGOUT>=1>> this line won't work, what are the '>>' at the end for? Also, if you are comparing you must use ==, = is for setting src.findid.i_logout_delay.remove //using src on a function without knowledge of what SRC is may give you problems, src is related to the one that made this function run, so if you do ingame .x logout to any player, you will be src as you are the one making the function to run SERV.NEWITEM=i_logout_delay //this is the correct code for it EQUIP=<NEW> [ITEMDEF i_logout_delay] src.newitem i_logout_timer <---- what is this? this is an itemdef block, not a function one, you can't execute code this way, remove line. src.act.equip // and this one. src.act.timer 30 //and this one too. NAME=Logout Delay ID=i_handr_1 TYPE=T_EQ_SCRIPT WEIGHT=0 LAYER=layer_special ON=@Create ATTR=attr_invis|attr_decay MORE1=30 MOREP=britain //you dont need this line since you are not using it anywhere ON=@Equip TIMER=1 ON=@Timer if ( <cont> ) if ( <more1> ) cont.message @079 <EVAL(<more1>)> // put countdown above my head. more1=<more1>-1 TIMER=1 return 1 //I think you should place an ELSE here to run when the item does not have more1 //cont.go <r5445,5450>,<r1080,1090> // this line will remove all the dorand section, wich is useless. DORAND 56 CONT.GOPLACE 5447,1086 CONT.GOPLACE 5447,1085 CONT.GOPLACE 5447,1084 CONT.GOPLACE 5447,1083 CONT.GOPLACE 5447,1082 CONT.GOPLACE 5447,1087 CONT.GOPLACE 5447,1088 CONT.GOPLACE 5447,1089 CONT.GOPLACE 5447,1090 CONT.GOPLACE 5448,1086 CONT.GOPLACE 5449,1086 CONT.GOPLACE 5450,1086 CONT.GOPLACE 5446,1086 CONT.GOPLACE 5445,1086 CONT.GOPLACE 5444,1086 CONT.GOPLACE 5443,1086 CONT.GOPLACE 5448,1087 CONT.GOPLACE 5448,1088 CONT.GOPLACE 5448,1089 CONT.GOPLACE 5448,1090 CONT.GOPLACE 5448,1085 CONT.GOPLACE 5448,1084 CONT.GOPLACE 5448,1083 CONT.GOPLACE 5448,1082 CONT.GOPLACE 5449,1087 CONT.GOPLACE 5449,1088 CONT.GOPLACE 5449,1089 CONT.GOPLACE 5449,1090 CONT.GOPLACE 5449,1085 CONT.GOPLACE 5449,1084 CONT.GOPLACE 5449,1083 CONT.GOPLACE 5449,1082 CONT.GOPLACE 5450,1087 CONT.GOPLACE 5450,1088 CONT.GOPLACE 5450,1089 CONT.GOPLACE 5450,1090 CONT.GOPLACE 5450,1085 CONT.GOPLACE 5450,1084 CONT.GOPLACE 5450,1083 CONT.GOPLACE 5450,1082 CONT.GOPLACE 5446,1087 CONT.GOPLACE 5446,1088 CONT.GOPLACE 5446,1089 CONT.GOPLACE 5446,1090 CONT.GOPLACE 5446,1085 CONT.GOPLACE 5446,1084 CONT.GOPLACE 5446,1083 CONT.GOPLACE 5446,1082 CONT.GOPLACE 5445,1087 CONT.GOPLACE 5445,1088 CONT.GOPLACE 5445,1089 CONT.GOPLACE 5445,1090 CONT.GOPLACE 5445,1085 CONT.GOPLACE 5445,1084 CONT.GOPLACE 5445,1083 SRC.GOPLACE 5445,1082 // Rand 56 ENDDO cont.tag.logout=0 src.newitem=i_reward_ticket {10 50} src.bounce //src.bounce what? you are bouncing src( so you are trying to put yourself in the backpack? ![]() RE: problem with logout script - RanXerox - 01-29-2014 05:03 AM Instead of DORAND 56 and GOPLACE... you could use MOVENEAR <someobject>,10 and it will put the character within 10 squares of that object. |