Need help with the Script for Coin NPC that converts lvl 25 cards to points

Started by sinuka, Feb 07, 2014, 10:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sinuka

If anyone can give me the full script I will appreciate it very much   /no1

United

Do you mean you need a script that converts monster cards to points? But only monsters that are higher than level 25?
Your best bet is to search around eAthena/rAthena etc.
UnityRO is a brand spanking new Pre-Renewal High Rate, we struggle and strive to reach our goals and hope to make an amazing playing atmosphere for you the player!

The Grand Opening is planned to launch on 10/02/2014 at 2PM GMT+1.
http://www.unity-ro.com/forum


Zedd



ianr0k

Newb query:

Does cards have levels? The best way that I could think of just have a list of the cards you want to be converted into points, last time I check etc. items don't have levels, but equipment do, maybe you could use that instead, editing the item_db.txt. The only problem would be is that you will need to edit them one by one, if this is even possible.

Gardosen

the easiest way is to grab the hercules wiki.

then you build it up logicaly.

you want to convert cards to points. every card needs a level. so you sort them into arrays.
like

set .@levelOneCards[], 1000,10001,10002,10003,100....;
set .@levelTwoCard[], 2000,2002,2003,2004;

you combine this with an OnInit: trigger, which means when the script gets loaded, he initialize the arrays
then when someone talks to the array you check the equip of the char and sort out all cards he owns.
after that you create a menu where you tell the user which cards he have which he can convert.
he can then choose to convert them.
when he choose convert, you check the lists, in which list the card is existing.
count how much of them he have
remove the cards
and multiply the points he gets for one card, by ammount of removed cards.
finished.

everything you need for this script, you can find in the hercules wiki.

Advantage:
- you learn to script by yourself
- you know how the script is working
- you dont have to pay money to someone who was not so lazy like you and used the hercules wiki  /no1

doing work by your own means you have a real passion for your project.