|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
Quests::Q&A This is the quest support section |

02-23-2013, 09:25 PM
|
Sarnak
|
|
Join Date: Oct 2007
Posts: 78
|
|
let me check
|

02-23-2013, 09:31 PM
|
Sarnak
|
|
Join Date: Oct 2007
Posts: 78
|
|
didnt have one of the ports forwarded to right ip. its fixed now so u can try again if u wish
|

02-23-2013, 09:32 PM
|
Discordant
|
|
Join Date: Jan 2013
Posts: 284
|
|
There we go, logging in now.
|

02-23-2013, 10:14 PM
|
Sarnak
|
|
Join Date: Oct 2007
Posts: 78
|
|
Well gambling bot is working sort of. It skips the second quest::say and returns any plat you give it also it always rolls a 0.
heres the script i have so far
#Script for a gambling bot based on random numbers
sub EVENT_SAY {
if ($text =~/Hail/i)
{ quest::say ("Greetings $name. Would you like to place a [wager]?"); }
if (&text =~/wager/i)
{ quest::say ("You place a wager anywhere from one to ten platinum. I then generate a random number between 0 and 10. It works like this. Wager multiplied by the number generated. If you wish to try your luck give me the number of platinum you wish to wagerand i will generate a number for you.");}
sub EVENT_ITEM {
if($platinum == 1)
{
$random_result = 0;
my $random_result = int(rand(10))+1;}
{ quest::say("You rolled a $random_result!");}
{ quest::givecash("0","0","0","$platinum*$random_res ult")}
}
}
|

02-23-2013, 10:15 PM
|
Sarnak
|
|
Join Date: Oct 2007
Posts: 78
|
|
doh just saw the mistake lol an & sing instead of $ oops
|

02-23-2013, 10:27 PM
|
Sarnak
|
|
Join Date: Oct 2007
Posts: 78
|
|
Ok fixed the quest say but still getting platinum back and the random is always 0
|

02-23-2013, 10:41 PM
|
Discordant
|
|
Join Date: Jan 2013
Posts: 284
|
|
Would you like my gambling script?
|

02-23-2013, 10:42 PM
|
Sarnak
|
|
Join Date: Oct 2007
Posts: 78
|
|
That would be great and i still cant find my mic lol
|
 |
|
 |

02-23-2013, 10:42 PM
|
Discordant
|
|
Join Date: Jan 2013
Posts: 284
|
|
If the roll is what you said you get back five times what you put in.
Here you go:
Code:
sub EVENT_SAY
{
my $NPCNAME = $npc->GetCleanName();
if($text=~/hail/i)
{
$client->Message(315, "$NPCNAME whispers to you, 'Hey there $name, up for some gambling? Pick a number from 1-10 by saying \"number #\", give me some money and if you're lucky and I roll your number you will get back five times the amount of money you put in.'");
}
elsif($text=~/number ([0-9]+)/i)
{
$numbers{$name} = $1;
$client->Message(315, "$NPCNAME whispers to you, 'Ok, you picked $1... Hand me your bet and let me grab my dice...'");
}
}
sub EVENT_ITEM
{
my $NPCNAME = $npc->GetCleanName();
if(defined($numbers{$name}))
{
$client->Message(315, "$NPCNAME whispers to you, 'Ok, your bet is $platinum pp, $gold gp, $silver sp, $copper cp. Rolling my dice!'");
$client->Message(315, "$NPCNAME tosses his dice on the ground and looks at the number that comes up.");
$roll = int(rand(9)+0.5) + 1;
plugin::Whisper("The roll is $roll!");
if($roll == $numbers{$name})
{
quest::givecash($copper*5,$silver*5,$gold*5,$platinum*5);
}
else
{
$client->Message(315, "$NPCNAME whispers to you, 'Oh, too bad, you lose, oh well, let me know if you want to try again.'");
}
}
else
{
$client->Message(315, "$NPCNAME whispers to you, 'You have to pick a number first!'");
quest::givecash($copper, $silver, $gold, $platinum);
plugin::return_items(\%itemcount);
}
}
|
 |
|
 |

02-23-2013, 10:55 PM
|
Sarnak
|
|
Join Date: Oct 2007
Posts: 78
|
|
lol waiting on the server to catch up bot still using old script even though its been changed and saved
|

02-23-2013, 10:58 PM
|
Discordant
|
|
Join Date: Jan 2013
Posts: 284
|
|
Haha, type #reloadpl, the server doesn't naturally reload scripts.
|

02-23-2013, 11:06 PM
|
 |
Dragon
|
|
Join Date: Dec 2009
Posts: 719
|
|
might want to add a check to make sure the client chose a number in the correct range and that it returns all money if no selection was made.
__________________
I muck about @ The Forge.
say(rand 99>49?'try '.('0x'.join '',map{unpack 'H*',chr rand 256}1..2):'incoherent nonsense')while our $Noport=1;
|

02-23-2013, 11:07 PM
|
Sarnak
|
|
Join Date: Oct 2007
Posts: 78
|
|
The script you posted works for you right?
EDIT: Nm I fixed it by changing plugin::whisper to $client->Message
|

08-28-2013, 08:07 AM
|
Fire Beetle
|
|
Join Date: Jul 2012
Posts: 9
|
|
I am trying to use Zamathos's script but it will not cast group buffs only single player. While in a group it will only single character that hails, speed, KEI, cure, heal.
Any ideas on how to get this to work to cast group buffs? Maybe even an option to click group or solo?
I am not a programmer, but I have a solo server for me and my 10 year old step son to play on that I am adding customizations.
Volkmeer
|

08-28-2013, 12:15 PM
|
Hill Giant
|
|
Join Date: Sep 2008
Location: So. California
Posts: 219
|
|
Zamthos released all his code, you can find more info in the link below. In his quests directory, under poearthb, the Verdai.pl script is the one you want. Thanks again Zamthos...
http://www.eqemulator.org/forums/showthread.php?t=37185
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 05:41 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |