Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

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

Reply
 
Thread Tools Display Modes
  #31  
Old 02-23-2013, 09:25 PM
Dabloon
Sarnak
 
Join Date: Oct 2007
Posts: 78
Default

let me check
Reply With Quote
  #32  
Old 02-23-2013, 09:31 PM
Dabloon
Sarnak
 
Join Date: Oct 2007
Posts: 78
Default

didnt have one of the ports forwarded to right ip. its fixed now so u can try again if u wish
Reply With Quote
  #33  
Old 02-23-2013, 09:32 PM
Zamthos
Discordant
 
Join Date: Jan 2013
Posts: 284
Default

There we go, logging in now.
Reply With Quote
  #34  
Old 02-23-2013, 10:14 PM
Dabloon
Sarnak
 
Join Date: Oct 2007
Posts: 78
Default

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")}
}
}
Reply With Quote
  #35  
Old 02-23-2013, 10:15 PM
Dabloon
Sarnak
 
Join Date: Oct 2007
Posts: 78
Default

doh just saw the mistake lol an & sing instead of $ oops
Reply With Quote
  #36  
Old 02-23-2013, 10:27 PM
Dabloon
Sarnak
 
Join Date: Oct 2007
Posts: 78
Default

Ok fixed the quest say but still getting platinum back and the random is always 0
Reply With Quote
  #37  
Old 02-23-2013, 10:41 PM
Zamthos
Discordant
 
Join Date: Jan 2013
Posts: 284
Default

Would you like my gambling script?
Reply With Quote
  #38  
Old 02-23-2013, 10:42 PM
Dabloon
Sarnak
 
Join Date: Oct 2007
Posts: 78
Default

That would be great and i still cant find my mic lol
Reply With Quote
  #39  
Old 02-23-2013, 10:42 PM
Zamthos
Discordant
 
Join Date: Jan 2013
Posts: 284
Default

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);
    }
}
Reply With Quote
  #40  
Old 02-23-2013, 10:55 PM
Dabloon
Sarnak
 
Join Date: Oct 2007
Posts: 78
Default

lol waiting on the server to catch up bot still using old script even though its been changed and saved
Reply With Quote
  #41  
Old 02-23-2013, 10:58 PM
Zamthos
Discordant
 
Join Date: Jan 2013
Posts: 284
Default

Haha, type #reloadpl, the server doesn't naturally reload scripts.
Reply With Quote
  #42  
Old 02-23-2013, 11:06 PM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

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;
Reply With Quote
  #43  
Old 02-23-2013, 11:07 PM
Dabloon
Sarnak
 
Join Date: Oct 2007
Posts: 78
Default

The script you posted works for you right?


EDIT: Nm I fixed it by changing plugin::whisper to $client->Message
Reply With Quote
  #44  
Old 08-28-2013, 08:07 AM
volkmeer
Fire Beetle
 
Join Date: Jul 2012
Posts: 9
Default

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
Reply With Quote
  #45  
Old 08-28-2013, 12:15 PM
rencro
Hill Giant
 
Join Date: Sep 2008
Location: So. California
Posts: 219
Default

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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 08:03 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3