• 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 Reward Bug.

APTGET

New Member
Joined
Dec 29, 2020
Messages
32
Reaction score
2
SERVER: Nostalrius 7.72 (I believe it is based on TFs 1.2)
TASK SYSTEM, I am using the solution in this topic: Tasks on Nostalrius 7.7 TFS 1.2 Problem (https://otland.net/threads/tasks-on-nostalrius-7-7-tfs-1-2-problem.263492/)


I recently added items to my TASKS NPC's Rewards. Before, he only awarded EXPERIENCE and MONEY. This NPC allows the player to do the same TASK twice.

Lua:
"reward",QuestValue(1003)>=150 -> "Thank you! Here's your reward.", Type=5259, Create(Type), Amount=9000, Experience(Amount), SetQuestValue(999, 0), SetQuestValue(1003, 0), SetQuestValue(903, QuestValue(903)+1)
"reward",QuestValue(1003)>=1,QuestValue(1003)<150 -> "You have to kill 150 ghouls. Come back later.", Idle

I used "Type=5259, Create(Type)".

The player does the task for the first time, the npc offers the unique item. When it is the second time, a bug occurs where the npc offers the same item infinitely. Causing slowness in the game, filling the backpack until there is no more cap, and begins to fall to the ground (infinite).


Why does this happen if in the "first task" it behaves normally?
How can I get around this problem?
Where can I set so that the player can only do tasks that have items once?



TKS!
 
Last edited:

Olddies

Veteran OT User
Joined
Nov 21, 2009
Messages
1,137
Solutions
12
Reaction score
278
Location
Rep.Dom
Lua:
"reward",QuestValue(1029)>=3000 -> "Thank you! Here's your reward.", Amount=1, Create(3389), SetQuestValue(999, 0), SetQuestValue(1029, 0), SetQuestValue(929, QuestValue(929)+1)
"reward",QuestValue(1029)>=1,QuestValue(1029)<3000 -> "You have to kill 3000 demons. Come back later.", Idle
 
OP
OP
APTGET

APTGET

New Member
Joined
Dec 29, 2020
Messages
32
Reaction score
2
Lua:
"reward",QuestValue(1029)>=3000 -> "Thank you! Here's your reward.", Amount=1, Create(3389), SetQuestValue(999, 0), SetQuestValue(1029, 0), SetQuestValue(929, QuestValue(929)+1)
"reward",QuestValue(1029)>=1,QuestValue(1029)<3000 -> "You have to kill 3000 demons. Come back later.", Idle

:O Thanks.

How can I change so that I can only do one task once? Where am I going to change this?
 
Top