Script for LDoN/Adventure Merchant - EQEmulator Forums (2024)


Script for LDoN/Adventure Merchant - EQEmulator Forums (1) Script for LDoN/Adventure Merchant - EQEmulator Forums (2)
EQEmulator Home > EQEmulator Forums > Support> Support::Windows Servers
Script for LDoN/Adventure Merchant
Home Forums Register Members List Today's Posts Search
Script for LDoN/Adventure Merchant - EQEmulator Forums (5) Script for LDoN/Adventure Merchant - EQEmulator Forums (6)

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


Thread ToolsDisplay Modes
Script for LDoN/Adventure Merchant - EQEmulator Forums (8) Script for LDoN/Adventure Merchant - EQEmulator Forums (9)

#1

Script for LDoN/Adventure Merchant - EQEmulator Forums (10)11-16-2017, 12:43 AM

Movement

Sarnak

Join Date: Sep 2011

Posts: 77

Script for LDoN/Adventure Merchant - EQEmulator Forums (11)Script for LDoN/Adventure Merchant

Can anyone tell me what the perl script would be for turning in a stack of items to an adventure merchant and adding LDoN points based on the amount in the stack? ie. 1 unit or item = 1 point. But a stack of 1000 would equal 1000 points.

I have a script but its not working.. Here is my script.

Code:

sub EVENT_ITEM {if ($itemcount{4613} >0) {quest::UpdateLDoNPoints(1 * $itemcount{4613}, 1);}}

I have also tried this variant:

Code:

sub EVENT_ITEM {if ($itemcount{4613} >0) {quest::addldonpoints(1 * $itemcount{4613}, 1);}}

What the code above is supposed to do is give 1 point per item turned in. The "items" stack to 1000. Turn in a stack of 500 of them, get 500 points added.

The problem is its not "awarding" the points. Maybe I need to zone to check (havent checked this to see) but its not updating immediately if thats the case.

Any way, if anyone has insight into why this isnt working it would be greatly appreciated.

I have scoured google, this forum, and the wiki but coming up empty on this.

Thanks in advance!

Edit: zoning isnt working =/

Script for LDoN/Adventure Merchant - EQEmulator Forums (13) Script for LDoN/Adventure Merchant - EQEmulator Forums (14)
Script for LDoN/Adventure Merchant - EQEmulator Forums (15) Script for LDoN/Adventure Merchant - EQEmulator Forums (16)

#2

Script for LDoN/Adventure Merchant - EQEmulator Forums (17)11-16-2017, 09:01 AM

Yard Dogg

Sarnak

Join Date: Jul 2017

Posts: 32

Script for LDoN/Adventure Merchant - EQEmulator Forums (19)

Quote:

Originally Posted by Movement

{4613}

I'm no expert, but are those supposed to be "{" curly brackets ?

Script for LDoN/Adventure Merchant - EQEmulator Forums (22) Script for LDoN/Adventure Merchant - EQEmulator Forums (23)
Script for LDoN/Adventure Merchant - EQEmulator Forums (24) Script for LDoN/Adventure Merchant - EQEmulator Forums (25)

#3

Script for LDoN/Adventure Merchant - EQEmulator Forums (26)11-16-2017, 11:30 PM

Movement

Sarnak

Join Date: Sep 2011

Posts: 77

Script for LDoN/Adventure Merchant - EQEmulator Forums (27)

Quote:

Originally Posted by Yard Dogg

I'm no expert, but are those supposed to be "{" curly brackets ?

Wait... You might be on to something.

curly brackets didnt work :(

gonna try some other stuff and will post back here with progress made (if any).

Script for LDoN/Adventure Merchant - EQEmulator Forums (30) Script for LDoN/Adventure Merchant - EQEmulator Forums (31)
Script for LDoN/Adventure Merchant - EQEmulator Forums (32) Script for LDoN/Adventure Merchant - EQEmulator Forums (33)

#4

Script for LDoN/Adventure Merchant - EQEmulator Forums (34)11-17-2017, 04:45 AM

Movement

Sarnak

Join Date: Sep 2011

Posts: 77

Script for LDoN/Adventure Merchant - EQEmulator Forums (35)

Looks like I am just going to have to use the in game way of adding LDoN points (by selling items to adventure merchants). I am wondering if there is a script that will just look at all the "ldon point worthy" items in your inventory and remove them by clicking a "sell" or "exchange" keyword/link instead of having to do it manually. I suspect in order to do this I would need a script that could:
1. see what items, if any - you had in your inventory that had a LDoN point value to them
2. remove those items from your inventory
3. credit you with points associated to whatever items were removed.
4. tell you how many points it credited to you.

Does anyone know if this would even be possible?

Edit:

Theres THIS that could be used to facilitate that but how would you use it to add points?

Code:

quest::collectitems(item_id, remove) # Returns number of item_id that exist in inventory. If remove is true, items are removed as they are counted.

Script for LDoN/Adventure Merchant - EQEmulator Forums (37) Script for LDoN/Adventure Merchant - EQEmulator Forums (38)
Script for LDoN/Adventure Merchant - EQEmulator Forums (39) Script for LDoN/Adventure Merchant - EQEmulator Forums (40)

#5

Script for LDoN/Adventure Merchant - EQEmulator Forums (41)11-17-2017, 11:54 AM

Yard Dogg

Sarnak

Join Date: Jul 2017

Posts: 32

Script for LDoN/Adventure Merchant - EQEmulator Forums (43)

The one thing I do remember seeing somewhere on these forums, was
someone changing all the adventure merchants to regular (41) with an
sql query that used a formula to price everything with a value somewhat
equivalent to the ldon points. (buying the items with plat).
As for where that thread is, I have no idea. I remember seeing it though.
It's another option, if you can find it.

Script for LDoN/Adventure Merchant - EQEmulator Forums (45) Script for LDoN/Adventure Merchant - EQEmulator Forums (46)
Script for LDoN/Adventure Merchant - EQEmulator Forums (47) Script for LDoN/Adventure Merchant - EQEmulator Forums (48)

#6

Script for LDoN/Adventure Merchant - EQEmulator Forums (49)11-18-2017, 05:47 PM

Movement

Sarnak

Join Date: Sep 2011

Posts: 77

Script for LDoN/Adventure Merchant - EQEmulator Forums (50)

I got it working. Natedog (actually thinking of calling him NateGod instead! :P) helped me. Theres no way I could have gotten it working with out him and no way I could have figured out the code below. I am posting here to give him credit and thanks and going to post the code below so that it may help others in the future!

Code:

sub EVENT_SAY { my %stuff = ( #itemID->POINTS->THEME 4613 => [1, 1], # Some item, Deepest Guk Theme 1234 => [1, 2], # some item, Miraguls Menagerie Theme 2345 => [1, 3], # some item, Mistmoore Catacombs Theme 3456 => [1, 4], # some item, Rujarkian Hills Theme 13006 => [1, 5], # some item, Takish-Hiz Theme --- WATER FLASK for example.. ); my %themes = ( 1 => "Deepest Guk Theme", 2 => "Miraguls Menagerie Theme", 3 => "Mistmoore Catacombs Theme", 4 => "Rujarkian Hills Theme", 5 => "Takish-Hiz Theme" ); my $collected = 0; if ($text=~/Hail/i) { plugin::Whisper("You can hand in your " . quest::saylink("stuff",1)); } elsif ($text=~/stuff/i) { plugin::Whisper("Collecting all LDON items..."); foreach my $key (keys %stuff) { $collected = quest::collectitems($key, 1); if($collected) { quest::addldonpoints($stuff{$key}[0]*$collected, $stuff{$key}[1]); $client->Message(315, "Added " . $stuff{$key}[0]*$collected . " points to " . $themes{$stuff{$key}[1]}); } } }}

Script for LDoN/Adventure Merchant - EQEmulator Forums (52) Script for LDoN/Adventure Merchant - EQEmulator Forums (53)


«Previous Thread|Next Thread»


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 Rules



All times are GMT -4. The time now is 11:20 AM.



Script for LDoN/Adventure Merchant - EQEmulator Forums (2024)

References

Top Articles
Latest Posts
Article information

Author: Dean Jakubowski Ret

Last Updated:

Views: 6500

Rating: 5 / 5 (50 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Dean Jakubowski Ret

Birthday: 1996-05-10

Address: Apt. 425 4346 Santiago Islands, Shariside, AK 38830-1874

Phone: +96313309894162

Job: Legacy Sales Designer

Hobby: Baseball, Wood carving, Candle making, Jigsaw puzzles, Lacemaking, Parkour, Drawing

Introduction: My name is Dean Jakubowski Ret, I am a enthusiastic, friendly, homely, handsome, zealous, brainy, elegant person who loves writing and wants to share my knowledge and understanding with you.