| Blockland Forums > General Discussion |
| Random piece of code in GM zombie? |
| (1/1) |
| slimabob:
I was looking in the script for Rotondo's Zombie mod and came across this: --- Code: ---if(%targ.getclassname() $= "Player" && isInMinigame(%targ) && isInSameMinigame(%player,%targ) && %player.spawnbrick.getgroup().client.tdmTeam == %targ.client.tdmTeam) { %player.setmoveobject(%targ); return 1; } } return 0; } function servercmdcast(%client,%sand){ if(%sand $= "sandwich" || %sand $= "sandvich") { Messageclient(%client,'0',"You cast a sandwich..."); %client.player.mountimage(sandwichimage,0); %client.player.playthread(2,armreadyright); if(%client.name $= "Badspot") { schedule(2000,0,messageclient,%client,'0',"...but Badspot... wait wtf?"); return; } %client.player.schedule(2000,playthread,2,root); %client.player.schedule(2000,unmountimage,0); schedule(2000,0,messageclient,%client,'0',"...but Badspot takes it before you eat it."); return; } if(%sand $= "fireball"){ Messageclient(%client,'0',"You cast a fireball, but then you realize this isn't Age of Time."); return; } if(%sand $= "Badspot") { Messageclient(%client,'0',"You have casted poorly."); schedule(10000,0,Messageclient,%client,'0',"<color:0000EE>Badspot connected."); schedule(14000,0,Messageclient,%client,'0',"<color:FFFF00>Badspot<color:FFFFFF>: hey"); schedule(20000,0,Messageclient,%client,'0',"<color:0000EE>Badspot spawned."); return; } if(%sand $= "") { Messageclient(%client,'0',"You cast nothing."); schedule(2000,0,Messageclient,%client,'0',"Nothing happened."); return; } Messageclient(%client,'0',"You have casted poorly."); --- End code --- What exactly does this mean? |
| Jaxx:
rotondo was loving around and put in random code snippets that there might be a one in a million chance of someone happening upon. happens a lot with the older, more experienced coders. |
| slimabob:
Heh, that's kinda cool. Thanks. |
| Navigation |
| Message Index |