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-30-2009, 09:00 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

I looked that up and it doesn't quite seem to be what I'm looking for. I saw on some server where an adventure merchant accepted some tokens that were dropped from random monsters and used to buy gear, and I want to try to emulate that.
Reply With Quote
  #2  
Old 01-30-2009, 09:40 PM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

thats what I ment. The Credit System quest write up using actual plat but it can be easily changed to use items instead
Reply With Quote
  #3  
Old 01-30-2009, 10:01 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

ok lol can you link what you are looking at then because I must have been looking at something way diferent. Uhm my bad
Reply With Quote
  #4  
Old 01-30-2009, 10:11 PM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

I can't seem to find the original but here is my copy

use this as a base but convert from using plat to using items and giving items instead of casting spells




credit card system

Code:
sub EVENT_SAY { 
if($text=~/Hail/i){
quest::say("Hello, $name. Are you interested in [buffs] or would you like to know 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 [buffs]?");
}

if($text=~/obtain/i){
quest::say("For every platinum you bring me you shall receive one credit.  These credits can be redeemed for buffs at your request.");
}

if($text=~/buffs/i || $text=~/yes/i) {  #### What buffs does he offer and how much credit?
quest::say("I have the following to offer you:");
quest::say("[Cleanse] --full health and mana restore-- - FREE");
quest::say("[Temperance] - 25p");
quest::say("[Virtue] - 50p");
quest::say("[C1] - 5p");
quest::say("[C2] - 25p");
quest::say("[C3] - 75p");
}

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 [buffs]?");
$buffbot = undef;
}
}

#cleanse
if($text=~/cleanse/i){ #### Restores Mana and Health.  I use this as an alternative to simply casting a spell
$client->Heal();
$client->SetMana($client->GetMaxMana());
quest::say("As you wish!");
}

#buffs begins

#buff 1- Temperance
if($text=~/Temperance/i){
if ($buffbot >= 25) {
quest::selfcast(3692);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-25, 0, "Y9");
$buffbot = undef;
	}
else {
quest::say("You need more credits!");
$buffbot = undef;
	}
}
#temperance ends

#virtue
if($text=~/virtue/i){
if ($buffbot >= 50) {
quest::selfcast(3467);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-50, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}

#c1
if($text=~/c1/i){
if ($buffbot >= 5) {
quest::selfcast(174);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-5, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}

#c2
if($text=~/c2/i){
if ($buffbot >= 25) {
quest::selfcast(1693);
quest::say("As you wish!");
quest::setglobal("buffbot", $buffbot-25, 0, "Y9");
$buffbot = undef;
}
else {
quest::say("You need more credits!");
$buffbot = undef;
}
}

#c3
if($text=~/c3/i){
if ($buffbot >= 75) {
quest::selfcast(2570);
quest::say("As you wish!");
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($platinum >= 1){
  	quest::setglobal("buffbot", $buffbot+$platinum, 0, "Y9");
	quest::say("Your credit has been increased by $platinum.");
	$buffbot = undef;
	quest::settimer(1,1);
	}
else {
	quest::say("I only accept platinum.");
	$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
  #5  
Old 01-30-2009, 10:16 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

Alright thanks. So this will just go on a normal NPC and not a merchant or anything, right?
Reply With Quote
  #6  
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
  #7  
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
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 06:06 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3