Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 01-31-2009, 12:25 AM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

this can go onto ANY npc (except a banker cuase you cannot give things to a banker)

you see where npc tells you how much it cost to cast a spell?
you can price your armor/weapon in same way

so players comes to this NPC and gvies him 50 tokens
npcs adds this up- and you now have credit of 50

then npc will tell you:
"Filth Covered Magnificent Shoulderpads of the Slime - cost 35 tokens"

player will say "give me Filth Covered Magnificent Shoulderpads of the Slime"

Npc gives player the "Filth Covered Magnificent Shoulderpads of the Slime" and substracts 35 credits from player's account

thats the general idea
Reply With Quote
  #2  
Old 01-31-2009, 12:41 AM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

alright, I'm looking at the code and trying to figure out how I will be able to do it, and it looks like it will be relatively easy excluding the fact that I have no experience in coding. Thanks a lot for the code.
Reply With Quote
  #3  
Old 01-31-2009, 02:13 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

Alright, I changed everything around to match what I want on my server, but when I turn in the item that should be used for credit, he doesn't count it. He will say he accepted and it will say that your credit has risen, but when I do credit value it will say I have 0 credit and cannot buy anything.

sub EVENT_SAY {
if($text=~/Hail/i){
quest::say("Greetings, $name. Are you looking to get rare [items] or do you want to see your [Credit Info]?");
}

if($text=~/Credit Info/i){
quest::say("Would you like to know how to [obtain] credit, your current [credit value], or available [items]?");
}

if($text=~/obtain/i){
quest::say("For every Zipz Drake Skull you bring me you will get one credit which you can use to buy items that are not in any loot tables.");
}

if($text=~/items/i || $text=~/yes/i) { #### What buffs does he offer And how much credit?
quest::say("This is it:");
quest::say("[Arrow of Striking] --25 damage/200 range arrow-- - 10");
quest::say("[Orb of the Spectre] --Illusion Spectre clicky-- - 10");
quest::say("[Master Pelican Charm]--Improved Charm-- - 20");
quest::say("[Essence of the Spellcaster] --Gather Mana clicky and decent range item-- - 20");
quest::say("[Ring of Ice] --Summons a multi-element pet-- - 25");
quest::say("[Kazookaleyli] --The ultimate bard instrument-- - 20");
}

if($text=~/credit value/){
if ($buffbot >= 1) {
quest::say("Your current credit is $buffbot");
$buffbot = undef;
}
else {
quest::say("You have 0 credit. Would you like to know how much you need to donate obtain [items]?");
$buffbot = undef;
}
}

#cleanse
if($text=~/Arrow of Striking/i){ #### Restores Mana And Health. I use this as an alternative to simply casting a spell
if ($buffbot >= 10) {
quest::summonitem(1441);
quest::setglobal("buffbot", $buffbot-10, 0, "Y9");
quest::say("Arrows are good for shooting!");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}

#buff 1- Temperance
if($text=~/Orb of the Spectre/i){
if ($buffbot >= 10) {
quest::summonitem(1442);
quest::say("Have fun with it.");
quest::setglobal("buffbot", $buffbot-10, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}
#temperance ends

#virtue
if($text=~/Master Pelican Charm/i){
if ($buffbot >= 20) {
quest::summonitem(1446);
quest::say("This is definitely an item!");
quest::setglobal("buffbot", $buffbot-20, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}

#c1
if($text=~/Essence of the Spellcaster/i){
if ($buffbot >= 20) {
quest::summonitem(1447);
quest::say("Enjoy the mana!");
quest::setglobal("buffbot", $buffbot-20, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}

#c2
if($text=~/Ring of ice/i){
if ($buffbot >= 25) {
quest::summonitem(11154);
quest::say("Beware of frostbite when you wear it for extended durations.");
quest::setglobal("buffbot", $buffbot-25, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}

#c3
if($text=~/Kazookaleyli/i){
if ($buffbot >= 20) {
quest::summonitem(144;
quest::say("Only the best bards have this!");
quest::setglobal("buffbot", $buffbot-75, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}

}

sub EVENT_ITEM {
#give a plat, get a credit. Takes any platinum over 1.
if($itemcount{1440} >= 1){
quest::setglobal("buffbot", $buffbot+$itemcount{1440}, 0, "Y9");
quest::say("Your credit has risen.");
$buffbot = undef;
quest::settimer(1,1);
}
else {
quest::say("I only accept Zipz Drake Skulls.");
$buffbot = undef;
}
plugin::return_items(\%itemcount);

}

sub EVENT_TIMER {
if ($timer == 1) {
quest::say("Would you like to know your total [credit value]?");
quest::stoptimer(1);
}
}
Reply With Quote
  #4  
Old 01-31-2009, 02:22 PM
leslamarch
Discordant
 
Join Date: Sep 2006
Location: Green Bay, WI
Posts: 436
Default

make sure to check and see that qglobal is set to 1 and not 0 in your database.
Reply With Quote
  #5  
Old 01-31-2009, 02:29 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

I checked buffbot in quest_globals and it was already set to 1.
Reply With Quote
  #6  
Old 01-31-2009, 06:48 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

Is there anything wrong with the code or any reason it should not be working?
Reply With Quote
  #7  
Old 01-31-2009, 07:35 PM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

make sure that NPC you using for this has his Globals flag turned on - look into npctypes table - there is a collumn like that there - wihout it NPC will not properly store and remember global variable values

EDIT: umm looks like someone allready sugested that... sorry =)
Reply With Quote
  #8  
Old 01-31-2009, 02:29 PM
leslamarch
Discordant
 
Join Date: Sep 2006
Location: Green Bay, WI
Posts: 436
Default

Quote:
Originally Posted by Randymarsh9 View Post

if($text=~/items/i || $text=~/yes/i) { #### What buffs does he offer And how much credit?
quest::say("This is it:");
quest::say("[Arrow of Striking] --25 damage/200 range arrow-- - 10");
quest::say("[Orb of the Spectre] --Illusion Spectre clicky-- - 10");
quest::say("[Master Pelican Charm]--Improved Charm-- - 20");
quest::say("[Essence of the Spellcaster] --Gather Mana clicky and decent range item-- - 20");
quest::say("[Ring of Ice] --Summons a multi-element pet-- - 25");
quest::say("[Kazookaleyli] --The ultimate bard instrument-- - 20");
}
just a suggestion, but for this part i would use this in your script
Code:
quest::itemlink(item #);
this way they can just click on the link and see the reward.
Reply With Quote
Reply

Thread Tools
Display Modes

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 02:00 AM.


 

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 - 2026, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3