• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

[Npc] Npc that gives blessings to each level a price

Knight God

Member
Joined
Oct 19, 2008
Messages
1,180
Reaction score
21
Good morning otland.net, well my order is as follows:
in real tibia, the blessings cost a certain price depending on your level, and good wishes to know if is possible for a single NPC sells the 5 blessings and the price goes up according to their level, for example:

Code:
Level	Each Bless (in gp)
1 to 30	2,000
31	2,200
32	2,400
33	2,600
34	2,800
35	3,000
36	3,200
37	3,400
38	3,600
39	3,800
40	4,000
41	4,200
42	4,400
43	4,600
44	4,800
45	5,000
46	5,200
47	5,400
48	5,600
49	5,800
50	6,000
51	6,200
52	6,400
53	6,600
54	6,800
55	7,000
56	7,200
57	7,400
58	7,600
59	7,800
60	8,000
61	8,200
62	8,400
63	8,600
64	8,800
65	9,000
66	9,200
67	9,400
68	9,600
69	9,800
70	10,000
71	10,200
72	10,400
73	10,600
74	10,800
75	11,000
76	11,200
77	11,400
78	11,600
79	11,800
80	12,000
81	12,200
82	12,400
83	12,600
84	12,800
85	13,000
86	13,200
87	13,400
88	13,600
89	13,800
90	14,000
91	14,200
92	14,400
93	14,600
94	14,800
95	15,000
96	15,200
97	15,400
98	15,600
99	15,800
100	16,000
101	16,200
102	16,400
103	16,600
104	16,800
105	17,000
106	17,200
107	17,400
108	17,600
109	17,800
110	18,000
111	18,200
112	18,400
113	18,600
114	18,800
115	19,000
116	19,200
117	19,400
118	19,600
119	19,800
120+	20,000
.
well, I hope it is possible and that can help me with this request is not urgent order, but I hope you can help me :/
Thanks in advance.^_^
 
This works for 8.6 but I got the messages on both default and NPC's Channel.
Is there a way to avoid that? Also, it doesn't say anything when I say "no" to the blessings.

TFS - 0.4
 
Thanks man! Is working now!! :D
Just one more question... How can I add something when the player says "no", the NPC conversation ends and the NPC says something like "ok, bye then"
 
Thanks man! Is working now!! :D
Just one more question... How can I add something when the player says "no", the NPC conversation ends and the NPC says something like "ok, bye then"
Change (near the bottom) this..
Code:
            selfSay(nomoney, cid)
            return false
        end
    end
    return true
end
to this
Code:
            selfSay(nomoney, cid)
            return false
        end
    elseif (msgcontains(msg, "no") then
        selfSay("No then.", cid)
        talktopic[talkUser] = 0
    end
    return true
end
OR, you can can use this.
Code:
            selfSay(nomoney, cid)
            return false
        end
    elseif (msgcontains(msg, "no") then
        selfSay("Alright, bye then.", cid)
        talktopic[talkUser] = 0
        npcHandler:releaseFocus(cid)
    end
    return true
end
 
Last edited by a moderator:
Thanks! Is working now.

Just 2 things..
1. In the code you wrote there's a ")" missing before the first "then"
2. I see that the private NPC channel is working but the bless NPC still talks in the private and default channel, but only this 3 things
Code:
npcHandler:setMessage(MESSAGE_GREET, "Hello |PLAYERNAME|. Do you want my {blessings}?")
npcHandler:setMessage(MESSAGE_WALKAWAY, "Please visit again. You never know when you may need my blessings!")
npcHandler:setMessage(MESSAGE_FAREWELL, "Please visit again |PLAYERNAME|")

Is there a way to fix that too?
Thanks again!
 
Back
Top