syphin
Member
Posts: 12 Likes: 2
Currently Offline
Last Online: Apr 3, 2016 4:38:07 GMT
View Profile
Registered On: Feb 23, 2016 18:51:16 GMT
|
Post by syphin on Feb 23, 2016 18:55:16 GMT
Hey Darth, Huge fan of your work. Learned a lot so far. The problem im having is that My lever puller and inviter will get muted sometimes cause im using 2 scripts to do the invite and respond back. The loot runner will say !ps accept after they get the respond of invited.
Here is what I have tried:
auto 1000 listas 'invite script' | if [$curmsg.content == 'Jak' && $curmsg.isprivate] {say '!ps invite,$curmsg.sender'} [pm '$curmsg.sender' 'invited']
please help
Since I never stopped trying... here is the answer to my own question. Darth if you a way to make this cleaner please feel free to show me. Love to learn
auto 1 listas 'invite script' | if [$curmsg.content == 'PASSWORD' && $curmsg.isprivate] {say '!ps invite,$curmsg.sender'} | if [$curmsg.content == 'PASSWORD' && $curmsg.isprivate] {pm $curmsg.sender 'invited'}
|
|
|
Post by Kai on Feb 24, 2016 1:13:17 GMT
You should add a | wait 2000 into both of your scripts to prefent getting muted. In tibia u can send a MSG every 2 seconds without Getting muted. auto 1 listas 'invite script' | if [$curmsg.content == 'PASSWORD' && $curmsg.isprivate] {say '!ps invite,$curmsg.sender'| wait 2000} | if [$curmsg.content == 'PASSWORD' && $curmsg.isprivate] {pm $curmsg.sender 'invited'| wait 2000}
|
|
|
Post by Darth Maul on Feb 24, 2016 4:02:26 GMT
Since I never stopped trying... here is the answer to my own question. Darth if you a way to make this cleaner please feel free to show me. Love to learn auto 1 listas 'invite script' | if [$curmsg.content == 'PASSWORD' && $curmsg.isprivate] {say '!ps invite,$curmsg.sender'} | if [$curmsg.content == 'PASSWORD' && $curmsg.isprivate] {pm $curmsg.sender 'invited'} Both if statements are checking the same thing, if you receive a message that is identical to the 'PASSWORD', and if that message is received through a private message, then invite the player and send that player a message saying that they were invited. There's no need to use two identical if statements. In elfbot you can perform multiple actions by using a separator. '|'. Looking back at the script you posted, you did use one of these between your two if statements, nice work. We'll also add a delay to stop you from getting muted, since Kai suggested using 2seconds, we'll use that. Using these two things, in conjunction with your script, would make it more efficient and easier to read. Your script should look like this: auto 100 | listas 'invite script' | if [$curmsg.content == 'PASSWORD' && $curmsg.isprivate] {say '!ps invite, $curmsg.sender' | wait 2000 | pm $curmsg.sender 'You have been invited to [$self.name]s private spawn by using the PASSWORD.'}
|
|
|
Post by Darth Maul on Feb 24, 2016 4:04:20 GMT
|
|
syphin
Member
Posts: 12 Likes: 2
Currently Offline
Last Online: Apr 3, 2016 4:38:07 GMT
View Profile
Registered On: Feb 23, 2016 18:51:16 GMT
|
Post by syphin on Feb 25, 2016 0:59:01 GMT
Thanks for all the info and help guys. I added and moded my script to match this one and it does work a lot better. Thanks a ton
|
|