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

Lua Task System

GM Venom

Active Member
Joined
Jan 28, 2013
Messages
145
Reaction score
28
I'm using Avesta and I am developing a Task System for a friend.
How do i add Orc Shaman, Orc Berserker, Orc Warlord, Orc Spearman and Orc Warrior to this function?

Right now the task only accept "Orc" as a valid creature to kill for the task, i want all Orc types to be included.

Code:
[1] = {monster = "Orc", killsRequired = 100, storage = 9001, exp = 2500, money = 1000},





Rep+ to the person who help! Thank you!
 
Code:
[1] = {monster = "Orc", killsRequired = 100, storage = 9001, exp = 2500, money = 1000},
[2] = {monster = "Orc Spearman", killsRequired = 100, storage = 9002, exp = 5000, money = 2000},
[3] = {monster = "Orc Berserker", killsRequired = 100, storage = 9003, exp = 7000, money = 2000}

etc, remember change storage 9000 to 9001, 9002, 9003.. in each new line.
 
Code:
[1] = {monster = "Orc", killsRequired = 100, storage = 9001, exp = 2500, money = 1000},
[2] = {monster = "Orc Spearman", killsRequired = 100, storage = 9002, exp = 5000, money = 2000},
[3] = {monster = "Orc Berserker", killsRequired = 100, storage = 9003, exp = 7000, money = 2000}

etc, remember change storage 9000 to 9001, 9002, 9003.. in each new line.

This way it will be one task for each monster.
I want all the Orc Creatures to be included in one.

Do you understand how i mean? Please
 
Code:
[1] = {monster = {"Orc Shaman", "Orc Berserker", "Orc Warlord, "Orc Spearman", "Orc Warrior"}, killsRequired = 100, storage = 9001, exp = 2500, money = 1000},

And where you check the creature name use isInArray(monster, getCreatureName) to check the monster name.
 
Use a table within the table, insted of monster = ..., use monster = {..., ..., ...}
... = your monsters.
Then just use if(isInArray(task.id.monster), Creature(target):getName())

Seconds too late haha
 
Back
Top