Jump to content
saa0d

Functions

Recommended Posts

-- Change gold into Dollar Note to avoid overflow
    local overflow = GetChaAttr( role , ATTR_GD )
    if overflow > 1800000000 then
        TakeMoney(role, 0, 1800000000)
        GiveItem(role, 0, 7835, 18, 4)
        SystemNotice(role, "System changed your 1.8B Gold into 1.8B Dollar Notes!")
    end    
    
end

Hello, I want to ask something:

GiveItem(role, 0, 7835, 18, 4)

What does the 0 and 4 represent? I saw this type of syntax elsewhere in the server files. Could someone clarify please?

Share this post


Link to post
Share on other sites

The "0" represents given by system I think, not completely sure either. The "4" is the quality of item given. A clear example is black dragon equipment, it changes according to the quality given.

Share this post


Link to post
Share on other sites
40 minutes ago, Angelix said:

The "0" represents given by system I think, not completely sure either. The "4" is the quality of item given. A clear example is black dragon equipment, it changes according to the quality given.

Hey, thank you for answering but could you give an example on quality please? I didn't understand the bd example. Thanks!

Share this post


Link to post
Share on other sites

If you played official Tales of Pirates, you would sometimes see around black dragon equipment such as armor, globes or boots, they're the same item ID, but can have different stats depending on the quality. They were called "curse points", from 0 to 8 curse points, 0 being the best and 8 being worst. a 0 CP BD equipment (armor) had +10 stats and something like +30 PR, 8 CP had like +8 stats and +27 PR I think. Those were differentiated by it's quality at server level, 0CP was obtained by something like "GiveItem(Player, 0, <ItemID>, 1, 20)" while 8CP was obtained by ""GiveItem(Player, 0, <ItemID>, 1, 13)" or something like that.

If that is still not understandable, try going in-game and using the "make" command with something like this "&make <ItemID>, <ItemQuantity>, <ItemQuality>". For example try grabbing a sword and using 1 as quantity and 22 as quality, the sword should appear with predetermined prefix and also with random +10 stats. If you leave out the quality parameter, it will give you a sword with a random quality and random stats.

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, Angelix said:

If you played official Tales of Pirates, you would sometimes see around black dragon equipment such as armor, globes or boots, they're the same item ID, but can have different stats depending on the quality. They were called "curse points", from 0 to 8 curse points, 0 being the best and 8 being worst. a 0 CP BD equipment (armor) had +10 stats and something like +30 PR, 8 CP had like +8 stats and +27 PR I think. Those were differentiated by it's quality at server level, 0CP was obtained by something like "GiveItem(Player, 0, <ItemID>, 1, 20)" while 8CP was obtained by ""GiveItem(Player, 0, <ItemID>, 1, 13)" or something like that.

If that is still not understandable, try going in-game and using the "make" command with something like this "&make <ItemID>, <ItemQuantity>, <ItemQuality>". For example try grabbing a sword and using 1 as quantity and 22 as quality, the sword should appear with predetermined prefix and also with random +10 stats. If you leave out the quality parameter, it will give you a sword with a random quality and random stats.

Thank you very much for your kindness!

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...