• 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!

Need few Scripts

Nerf Irelia

New Member
Joined
Jan 24, 2013
Messages
3
Reaction score
0
Hello. I'm noob and i didn't find any answer for my questions so i'm writing post there.
1. I want to make spell system that character choose between spells, for example:
spells for lvl 5: spell A | spell B | spell C
and when player picks for example spell C he cant take spells A and B

2. automatic loot for player who made last hit to monster.
after monster loot from monster automaticly appears in his backpack

3. after monster kill all player who dealt him dmg gains access to quest doors and instead of corpse teleport appears.

thanks for help in advance
 
I'm not here to write a code, but if its any help I can give you guideline where I would start with the scripts.

1. I want to make spell system that character choose between spells, for example:
spells for lvl 5: spell A | spell B | spell C
and when player picks for example spell C he cant take spells A and B
I would modal window, there player can see the 3 spel options, with a button you can give him the option to read what does spell does and with another button you can teach him the spell.
In modal window title you can warn that they can only learn 1 spell.
Anyway when choice is made you will do a simple storage value change.

In the talkactions I suggest to make the spell itself and ask in there if the storage value what you gave when spell was learned is the correct number you set it to be.
Incase you want to still use "not so good" spells.xml then inside onCastSpell function you can do the storage value check.

2. automatic loot for player who made last hit to monster.
after monster loot from monster automaticly appears in his backpack
I use onDeath function (creaturescripts), from monster damage map you can find the payer who dealt most damage and then simply add the loot to that player instead of inside the corpse.
That of course requires monster loot to be inside a lua table, not inside the monsters.xml (although you can access the loot values from there too imo, never tried though)

3. after monster kill all player who dealt him dmg gains access to quest doors and instead of corpse teleport appears.
I would still use onDeath.. You can get the attackers and simply change storage values for em and instead of corpse you can transform the corpse into teleport.
 
Back
Top