Log in

View Full Version : AA merchant


Randymarsh9
02-01-2009, 04:38 PM
On my server, I tried to make a merchant that would sell someone 5 AAs for 2k. I also wanted it to be only level 70s that could talk to him or do the turn in. Everything works swimmingly until I turn in the 2k. At that point, I can about 2 AAs and then lose a random amount of levels. I went from 75 to 52, as well as 70 to 49.

sub EVENT_SAY{
if ($ulevel >=70){
if ($text =~/hail/i){
quest::say("Hello, I have heard that AA exp moves rather slowly on this server, so I am here to take advantage of that and sell level 70s [AA].");
}
if ($text =~/AA/i){
quest::say("Yes, it is two-thousand platinum for 5 AAs. You must be level 70 and have AA experience turned on or it will not work!");
}
}
}

sub EVENT_ITEM{
if ($ulevel >=70){
if ($platinum ==2000){
quest::exp(875000000);
}
}
}

ChaosSlayer
02-01-2009, 06:07 PM
wasn't there a comand just to give X number of AAs to a player?

Randymarsh9
02-01-2009, 06:13 PM
I looked for a command like that, but I can not find it.

ChaosSlayer
02-01-2009, 06:15 PM
this perhaps coudl be a great feature request for our Devs:

quest command to give, remove or reset known AAs from a player (clean reset as well as reset with giving spent AAs as unspent) wihout dealing with the XP

Randymarsh9
02-01-2009, 06:18 PM
Yeah I would like that too. The experience thing works like 50/50. I mean, you do get AAs, but you lose up to 20 levels at the same time, so it's not the best option.

banchicawawo
02-04-2009, 12:55 AM
This might not be the best work around, but if this quest is only for lvl 70s, then you could set the character back to lvl 70 after giving out the AAs correct?

Randymarsh9
02-04-2009, 01:04 AM
wow, that's a really good idea. I'm going to do that right now.

Randymarsh9
02-04-2009, 01:15 AM
That worked perfectly. It still lowers their level 5 levels, but since it brings it back up, it doesn't matter. Thanks for the suggestion!

banchicawawo
02-04-2009, 01:17 PM
No problem.

Just remember that when you set their level, they will start at the beginning of the level. Some players might get frustrated if they had their lvl 70 exp bar maxed out (not a huge deal though). If you never plan on expanding past lvl 70 and don't have exp loss upon death turned on, then it shouldn't be an issue.

I've been playing on the Emu and reading through the forums for a couple of years now, but recently started up my own server, so now I'm finally starting to see how everything comes together on the server side. I'm glad I could be of some help.

Yeormom
02-04-2009, 01:51 PM
Simply resetting the characters level is not a good idea. If their experience has been lowered followed by a death causing and lose experience, the character can jump around multiple levels for example, their level in some cases can be recalculated just as it is when they gain experience.

To add in a perl command to give aa's directly instead of experience is very trivial.

leslamarch
02-04-2009, 02:18 PM
To add in a perl command to give aa's directly instead of experience is very trivial.

maybe trivial to you, but not to someone else. Since it is so trivial why not offer guidance or a solution instead of just saying its trivial. I don't mean to be disrespectful, But the guy is clearly asking for help and if you didn't want to help why even post at all?

Randymarsh9
02-04-2009, 02:30 PM
I actually finished the quest and put in the custom quests section if anyone wants to see it or make suggestions on it. Right now, it's working perfectly for me, so I am happy with it.

Yeormom
02-04-2009, 04:54 PM
I don't mean to be disrespectful, But the guy is clearly asking for help and if you didn't want to help why even post at all?
If you would like to take a minute to actually read the thread, the op has already found a solution before I even posted. I simply presented a notification as to the adverse affects you may see in the future.

You either know how to modify the server code or you don't. If you do, then it is a trivial task and is even documented in the source code. To further clarify, by definition, it is trivial because it is a simple scenario that is very common for those who modify server code. I am doing nothing more than using the English language here. :)