Advertisement
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",NULL_KEY,"");
- //llSetScriptState("ToggleFish",FALSE);
- }
- //listen for fishing rod is equip
- listen(integer channel, string what, key who, string msg)
- {
- //if(llDetectedKey(0) == llGetOwner())
- //else
- if(llGetOwnerKey(who) == llGetOwner())
- {
- if(msg=="Equip" )
- {
- rod_equip = TRUE;
- //llSetScriptState("ToggleFish",TRUE);
- return;
- }
- else
- {
- rod_equip = FALSE;
- return;
- }
- /*
- else if(msg =="UnEquip")
- {
- rod_equip = FALSE;
- return;
- }
- */
- }
- }
- touch_start(integer total_number)
- {
- //ask for the fishing rod
- llRegionSayTo(llGetOwner(),-11223,"CheckRod");
- llSay(-11223,(string) llGetKey());
- if(out == TRUE && rod_equip == TRUE)
- {
- out = FALSE;
- llSay(10,"off");
- return;
- }
- else if(out == FALSE && rod_equip == TRUE)
- {
- out = TRUE;
- llSay(10,"on");
- return;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement