Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- integer out = FALSE;
- integer rod_equip = FALSE;
- //time 15 seconds delay for it to be visible
- default
- {
- state_entry()
- {
- llListen(-11223,"Fishing Rod","","");
- }
- //listen for fishing rod is equip
- listen(integer channel, string what, key who, string msg)
- {
- if(msg=="Equip" )
- {
- rod_equip = TRUE;
- return;
- }
- else
- {
- rod_equip = FALSE;
- return;
- }
- }
- touch_start(integer total_number)
- {
- //ask for the fishing rod
- llSay(-11223,"CheckRod");
- if(out == TRUE && rod_equip == TRUE)
- {
- llOwnerSay("Toggle Fish");
- out = FALSE;
- llSay(-11223,"off");
- return;
- }
- else if(out == FALSE && rod_equip == TRUE)
- {
- out = !out;
- llSay(-11223,"on");
- return;
- }
- }
- }
Add Comment
Please, Sign In to add comment