• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Help] Other kind of money?

tosse12

Panchira Project Member
Joined
Jun 10, 2007
Messages
864
Reaction score
9
Location
Sweden
okey this question is about "tibia money"

Is it possible to have like skulls, corrots or scarab coin as money?

you know when you change 100 gold - 1platium
and when you change 100 platium - 1 crystal coin
and now, when you change 100 cc to 1 skull, will that skull be avible to use when you want to buy items from npc's, or do you need to make a new script for it?
 
in trunk there is a function doPlayerRemoveMoney~~, if just simple action script which changing 100 cc for 1 scarab, then when this function will be used, scarab coin will not count.
Need remake this function for newtype of money, (i can't find it), or just write all NPC which will take their own money system
 
TFS? tags? trunk?

I am using: The Forgotten Server
rev1073, tags/0.2
To be more exacly, the server that talaturen realesed, http://otland.net/showthread.php?t=10141

simply action script and change npcs to need that item

Well I don't know how to do that (Change npcs so they need that item)

The script that make 100cc to 1 skull do I alread got

in trunk there is a function doPlayerRemoveMoney~~, if just simple action script which changing 100 cc for 1 scarab, then when this function will be used, scarab coin will not count.
Need remake this function for newtype of money, (i can't find it), or just write all NPC which will take their own money system

Okey found something :p

Code:
function getPlayerMoney(cid)
	return ((getPlayerItemCount(cid, ITEM_CRYSTAL_COIN) * 10000) + (getPlayerItemCount(cid, ITEM_PLATINUM_COIN) * 100) + getPlayerItemCount(cid, ITEM_GOLD_COIN))
I just need to add my scarab coin and skull in here right?
 
I will add this to my todo list, but unfortunately it will take at least a week before I have time to make it (a new function and some changes in existing functions).

If someone else have time for this I can tell you all you need to do is to create a function called doPlayerRemoveMoney that will base on a table like:
Code:
local money = {
    {GOLD_ID, 100},
    {PLATINUM_ID, 100},
    {CRYSTAL_ID, 10000}
}

And from that one it would remove money in the smartest way possible and give change etc. This way you could very simply insert your own currency types. You'd ofcourse also need to create a givePlayerMoney function to give money on the smartest way possible.

Then you need to edit few functions and maybe in the NPC system itself to use your functions instead of the source ones.
 
well as I said :p I have two months (8 weeks) while these 2 weeks I can map and fix monster loot and so :p

My ide is to make custom map with custom monsters ^_^ and custom loot (Just change the name of the items and dmg,and thiers skills)

@Oftopic
Btw, I like your "Signature"

"Perfection, is what we all need. As well as we need patience. To improve your skills, try thinking about this.
Without patience, the perfection will decrease, as you will do things faster and less carefull. Always think twice, recheck and think about that you can continue later. If you are about to leave, save it for later."

May I translate it in to swedish ? :p
 
You said 3 months first, but however xD

Yes, you may translate it but you must write like:
"the quote here" - Colandus
heuaheua :D

And it would be extremely good if you keep the formations (the bold, color, italics etc)

This is how I would have translated it:
Perfektionism, är något alla behöver. Precis som vi behöver tålamod. För att förbättra era kunskaper, försök att tänka på detta.
Utan tålamod, så minskar perfektionismen, för att ni kommer göra saker snabbare och slarvigare. Tänk alltid igen, kontrollera och tänk på att ni kan fortsätta senare. Om ni är påväg att gå, spara det till senare.

Do not reply to this either, as it is going offtopic! We don't need that do we? :p
 
Last edited:
well isn't there already a "doPlayerRemoveMoney" function?? i know there is, i just can't find it... and its pissing me off cuz i've been trying to do this for like a month and a half now
 
Well, if you read what I wrote, you need to make your own. Because the current one is made in source :p But stay cool, I'll make it! :D
 
lol alright, do you have ANY clue where it would be in source? because i tried adding the new type of money into the global file, but it didn't seem to have an effect on anything

Code:
ITEM_GOLD_COIN = 2148
ITEM_PLATINUM_COIN = 2152
ITEM_CRYSTAL_COIN = 2160
ITEM_COPPER_COIN = 6527
ITEM_FISH = 2667
ITEM_WORM = 3976
ITEM_BLUEBERRY = 2677
ITEM_BLUEBERRYBUSH = 2785
ITEM_BUSH = 2786
ITEM_PARCEL = 2595
ITEM_LABEL = 2599

and

Code:
function getPlayerMoney(cid)
	return ((getPlayerItemCount(cid, ITEM_COPPER_COIN) * 1000000) + (getPlayerItemCount(cid, ITEM_CRYSTAL_COIN) * 10000) + (getPlayerItemCount(cid, ITEM_PLATINUM_COIN) * 100) + getPlayerItemCount(cid, ITEM_GOLD_COIN))
end
here

didn't seem to be that easy i see
@off topic
glad to see your on otland now too :) your a great asset to the ot community
 
If you see, I was here before you xD But I was on a 2 months vacation :p

However, that variables there are only variables :p Just so you don't need to write the gold coin id when you need it, so you simply write ITEM_GOLD_COIN and it doesn't affect the source functions at all. The getPlayerMoney functions has nothing at all to do with them either as it's only for counting the money!

As I said, I will make the function!
 
Back
Top