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

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

Reply
 
Thread Tools Display Modes
  #1  
Old 01-10-2015, 06:21 AM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,603
Default

You can achieve this like this.
Code:
sub EVENT_CONNECT {
    quest::settimer("Crystals", 3600);
}

sub EVENT_TIMER {
    if ($timer eq "Crystals") {
        quest::stoptimer("Crystals");
        my $radiant = quest::ChooseRandom(1..5);
        my $ebon = quest::ChooseRandom(1..5);
        $client->AddCrystals($radiant, $ebon);
        $client->Message(315, "You have recieved $radiant Radiant Crystals and $ebon Ebon Crystals. You now have " . plugin::commify($client->GetRadiantCrystals()) . " Radiant Crystals and " . plugin::commify($client->GetEbonCrystals()) . " Ebon Crystals.");
        quest::settimer("Crystals", 3600);
    }
}

Last edited by Kingly_Krab; 01-10-2015 at 03:51 PM..
Reply With Quote
  #2  
Old 01-12-2015, 12:33 PM
utbbop
Sarnak
 
Join Date: May 2009
Location: Mentor
Posts: 58
Default

Quote:
Originally Posted by Kingly_Krab View Post
You can achieve this like this.
Code:
sub EVENT_CONNECT {
    quest::settimer("Crystals", 3600);
}

sub EVENT_TIMER {
    if ($timer eq "Crystals") {
        quest::stoptimer("Crystals");
        my $radiant = quest::ChooseRandom(1..5);
        my $ebon = quest::ChooseRandom(1..5);
        $client->AddCrystals($radiant, $ebon);
        $client->Message(315, "You have recieved $radiant Radiant Crystals and $ebon Ebon Crystals. You now have " . plugin::commify($client->GetRadiantCrystals()) . " Radiant Crystals and " . plugin::commify($client->GetEbonCrystals()) . " Ebon Crystals.");
        quest::settimer("Crystals", 3600);
    }
}
Thanks a ton!
Going to play with this a bit and will let you know if I have any questions!
Reply With Quote
  #3  
Old 01-12-2015, 01:00 PM
utbbop
Sarnak
 
Join Date: May 2009
Location: Mentor
Posts: 58
Default

Quote:
Originally Posted by Kingly_Krab View Post
You can achieve this like this.
Code:
sub EVENT_CONNECT {
    quest::settimer("Crystals", 3600);
}

sub EVENT_TIMER {
    if ($timer eq "Crystals") {
        quest::stoptimer("Crystals");
        my $radiant = quest::ChooseRandom(1..5);
        my $ebon = quest::ChooseRandom(1..5);
        $client->AddCrystals($radiant, $ebon);
        $client->Message(315, "You have recieved $radiant Radiant Crystals and $ebon Ebon Crystals. You now have " . plugin::commify($client->GetRadiantCrystals()) . " Radiant Crystals and " . plugin::commify($client->GetEbonCrystals()) . " Ebon Crystals.");
        quest::settimer("Crystals", 3600);
    }
}
Having some trouble getting this to work. Might be because Ebon and Radiant crystals arent showing up in-game/in my client. They show as Unknown DB Strings.

Any feedback as to why? Is it my client (UF)?

I have added a new currency called Planar Crystals of which I will use instead of Radiant and Ebon Crystals, but this is not showing up in-game at all in the Alt Currency Inventory window...
Reply With Quote
  #4  
Old 01-12-2015, 03:26 PM
utbbop
Sarnak
 
Join Date: May 2009
Location: Mentor
Posts: 58
Default

Quote:
Originally Posted by utbbop View Post
Having some trouble getting this to work. Might be because Ebon and Radiant crystals arent showing up in-game/in my client. They show as Unknown DB Strings.

Any feedback as to why? Is it my client (UF)?

I have added a new currency called Planar Crystals of which I will use instead of Radiant and Ebon Crystals, but this is not showing up in-game at all in the Alt Currency Inventory window...
Found some threads on dbstr.txt and was able to fix my unknown strings. Still cant get this to work.

I added this code to global_player.pl and I reduced the timer from 3600 to 10, for testing purposes, and nothing is happening.

Can you confirm that plugin::commify($client->GetRadiantCrystals()) is correct? Specifically the "commify". Havent seen that before and cant find it listed here: http://wiki.eqemulator.org/p?Ultimat...rence&frm=Main

Thanks for the help..
Reply With Quote
  #5  
Old 01-12-2015, 03:45 PM
rencro
Hill Giant
 
Join Date: Sep 2008
Location: So. California
Posts: 219
Default

Can you confirm that plugin::commify($client->GetRadiantCrystals()) is correct? Specifically the "commify". Havent seen that before and cant find it listed here: http://wiki.eqemulator.org/p?Ultimat...rence&frm=Main


It is "explained" here:
http://wiki.eqemulator.org/p?Perl_Pl...rence&frm=Main

Here are the helpful comments on it: If you need an example for this, you need help

Good luck..
Reply With Quote
  #6  
Old 01-12-2015, 04:20 PM
utbbop
Sarnak
 
Join Date: May 2009
Location: Mentor
Posts: 58
Default

Quote:
Originally Posted by rencro View Post
Can you confirm that plugin::commify($client->GetRadiantCrystals()) is correct? Specifically the "commify". Havent seen that before and cant find it listed here: http://wiki.eqemulator.org/p?Ultimat...rence&frm=Main


It is "explained" here:
http://wiki.eqemulator.org/p?Perl_Pl...rence&frm=Main

Here are the helpful comments on it: If you need an example for this, you need help

Good luck..
Ok, understood.
Still cant get it working though.

Tested some different code to make sure my currency and everything was working and it is. This appears to be an issue with the code in general or where I am putting it. I even tried switching from EVENT_CONNECT to EVENT_ZONE and it wont work.

Hmmmmm, going to keep trying...
Reply With Quote
  #7  
Old 01-12-2015, 04:13 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Ebon/Radiant crystals are not the same as alternate currency. The clients that have them (I think SoF+) all treat them separately from alternate currency. If you try to add Ebon/Radiant crystals as an alternate currency, they will show up as unknown-dbstr unless you edit client files. Instead of having Ebon/Radiant Crystals in the Alt Currency tab of your inventory, they should have their own little boxes similar to plat/gold/silver/copper in your main inventory window.

The crystals are loaded from the player profile, which differs from alt currency that loads from a specific packet for that. And, crystals have their own update packets for changing the amount displayed in the inventory window. They also use different vendor classes that are specific for Ebon or Radiant crystals, where Alt Currency vendors can be set to use 1 of any of the 19ish different standard alt currencies.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
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 08:34 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3