Vou fazer ake caso funcione coloco os parabens AQUI ;d
- Fórum
- OTServ
- Recursos
- Scripting
- Actions e Talkactions
- Sistema De Vip
info
Grupo: Campones
Registrado: 19/09/08
Posts: 13
Reputação: 0

info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

eu não entendi o porque dessa parte:
doPlayerAddItem(cid,13540,1)
poderia me explicar oque esse item faz ?
@Vodkart:
Bem,quando tentei fazer com que a quest funcionasse sem doPlayerAddItem,meu ot deu erro...Aí coloquei 1 id qualquer...Recomendo colocar 1 "medalha" ou algo do gênero.Ou simplesmente deixe como esta xD.
@AlexanderMatheus:
Obg por postar.Os scripts foram testados com sucesso no meu Yurots 3.3 do grafit.
Eu Gostei Do Script, Fiz Ele So Até a metade poq nao qero que o ticket seja vendido no npc.
soo quero pedir uma coisa: tipo quando a gente abre akele bauzinho e pega os itens a vip fica pra sempre, poq mesmo sem a orb e a medalha eu ainda passo pelo pisso qual deveria passar os vips. nao tem como concertar isso nao? pra tipo quando a gente fizer isso ganhar apenas 30 dias de vip
Problema resolvido, obrigado
BOA TARDE
BOM É O SEGUINTE EU ESTOU COM VARIOS POBLEMAS NO MEU OT QUERIA COLOKA COMANDOS NOVOS AREA VIP POR ITENS TIPO ASSIM EU ESCOLHO UM ITEM AI O CARA VAI COMPRA 30 DIAS VIP AI EU DO O ITENS PRA ELE AI ELE CLICK DO LADO DIREITO DO MOUSE EMCIMA DO ITEN ELE FICA COM 30 DIAS VIP SABE EU QUERIA ISSO NO MEU OT MAIS NAO SEI COLOKA SERA QUE VCS PODEM ME DA UMA AJUDA BOM QUALQUER COISA ADD MSN
dodojho@hotmail.com
Skyp: killobi2




info
Grupo: Artesão
Registrado: 17/05/08
Posts: 110
Reputação: +13
Vip System
Informações sobre o sistema:
Esse Vip System, é RECOMENDADO para versão 8.10 , já que as versões superiores já possuem outras funções que fazem com que a vip possa acabar, ou até ter roupa, o que não é o caso desse, que utiliza uma STORAGE.
Vamos lá!
Primeiro, a parte do PISO, ou seja na pasta MOVEMENTS
Vá na pasta data/movements/scripts, copie e cole um arquivo do tipo LUA , renomeie-o para Vip e cole isso dentro dele
Cole isso
function onStepIn(cid, item, pos)
teleport1 ={x=167, y=54, z=7} --Lugar que o player é teletransportado caso nao tenha vip
if isPlayer(cid) then
if item.actionid == 13540 then
vip = getPlayerStorageValue(cid,13540)
if vip == -1 then
doPlayerSendCancel(cid,"Esta area e exclusiva para players ViP.")
doTeleportThing(cid,teleport1)
else
end
end
end
end
Vá em data/movements/movements.xml e cole isso
<movevent event="StepIn" actionid="13540" script="vip.lua" />
Agora vamos para o Item que o NPC vende para transportar o player até a quest da Vip
Vá em actions/scripts e crie um arquivo de nome GoVip.
Cole isso
function onUse(cid, item, frompos, item2, topos)
local minLevel = 1
if (getPlayerLevel(cid) >= minLevel) then
doTeleportThing(cid, {x = 186, y = 409, z = 7}) --Aonde o player e levado(onde tem o baú) obrigatoriamente voce deve editar ^^
doRemoveItem(item.uid,1)
else
doPlayerSendTextMessage(cid, 22, "You need to be level " .. minlevel .. " to use this item.")
end
return TRUE
end
Vá em actions.xml cole isso:
<action itemid="Id Item" script="GoVip.lua" />
Agora vá em items/items.xml
Procure o id que você botou e coloque uma descrição nele para o player entender melhor.
No lugar proximo aonde o player e teleportado crie uma quest com o uniqueid 13540
Vá em actions.xml e cole isso de uma vez:
<action uniqueid="13540" script="VipChest.lua" />
Vá em scripts crie um arquivo(lua) com nome vipchest e cole isso nele:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 13540 then
queststatus = getPlayerStorageValue(cid,13540)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"Voce agora e vip.")
doPlayerAddItem(cid,13540,1)
setPlayerStorageValue(cid,13540,1)
else
doPlayerSendTextMessage(cid,22,"Voce ja tem vip.")
end
else
return 0
end
return 1
end
Agora o NPC
Crie 1 script com nome qalquer(de preferencia para os inesperientes 1 que nao use e que tenha no editor de mapas) e cole isso:
Lembrando, escolha uma roupa bonita para ele, um nome bom, etc.
Essa e a lista de cores ( achei no OT do Alissow )
E a lista de roupas para ele (Creditos para NoHeAD)
0 - Void
1 - <Nothing>
2 - Orc warlord
3 - Warwolf
4 - Orc rider
5 - Orc
6 - Orc shaman
7 - Orc warrior
8 - Orc berserker
9 - Necromancer
10 - Yellow butterfly
11 - Massive water elemental
12 - Archdemon
13 - Black sheep
14 - Sheep
15 - Troll
16 - Bear
17 - Beholder
18 - Ghoul
19 - Slime
20 - Quara predator
21 - Rat
22 - Cyclops
23 - Minotaur mage
24 - Minotaur archer
25 - Minutaur
26 - Rotworm
27 - Wolf
28 - Snake
29 - Minotaur guard
30 - Spider
31 - Deer
32 - Dog
33 - Skeleton
34 - Dragon
35 - Demon
36 - Poison spider
37 - Demon skeleton
38 - Giant spider
39 - Dragon lord
40 - Fire devil
41 - Lion
42 - Polar bear
43 - Scorpion
44 - Wasp
45 - Bug
46 - Quara constrictor
47 - Quara hydromancer
48 - Ghost
49 - Fire elemental
50 - Orc spearman
51 - Green Djinn
52 - Winter wolf
53 - Frost troll
54 - Witch
55 - behemoth
56 - Cave rat
57 - Monk
58 - Priestess
59 - Orc leader
60 - Pig
61 - Goblin
62 - Elf
63 - Elf arcarnist
64 - Elf Scout
65 - Mummy
66 - Dwarf geomancer
67 - Stone golem
68 - Vampire
69 - Dwarf
70 - Dwarf guard
71 - Dwarf soldier
72 - Quara mantassin
73 - Hero
74 - Rabbit
75 - Game master
76 - Swamp troll
77 - Quara pincher
78 - Banshee
79 - Ancient scarab
80 - Blue djinn
81 - Cobra
82 - Larva
83 - Scarab
84 - Ormuc
85 - Morguthis
86 - thalas
87 - Dipthrah
88 - Arkothep
89 - Mahrdis
90 - Vashresamun
91 - Ashmunrah
92 - Mimic
93 - Pirate marauder
94 - Hyaena
95 - Gargoyle
96 - Pirate cutthroat
97 - Pirate buccaneer
98 - Pirate corsair
99 - Lich
100 - Crypt shambler
101 - Bone beast
102 - Death slicer
103 - Efreet
104 - Marid
105 - Badger
106 - Skunk
107 - Demon
108 - Elder beholder
109 - Gazer
110 - Yeti
111 - Chicken
112 - Crab
113 - Lizard templar
114 - Lizard Sentinel
115 - Lizard Snakecharmer
116 - Kongra
117 - Merlkin
118 - Sibang
119 - Crocodile
120 - Carnaphila
121 - Hydra
122 - Bat
123 - Panda
124 - Centipede
125 - tiger
126 - Old Woman
127 - Old man
128 - Male citizen
129 - Male hunter
130 - Male mage
131 - Male knight
132 - Male nobleman
133 - Male summoner
134 - Male warrior
135 - <Nothing>
136 - Fenale citizen
137 - Female hunter
138 - Female mage
139 - Female Knight
140 - Female noblewoman
141 - Female summoner
142 - Female warrior
143 - Male barbarian
144 - Male druid
145 - Male wizard
146 - Male oriental
147 - Female barbarian
148 - Female druid
149 - Female wizard
150 - Female oriental
151 - Male pirate
152 - Male assassin
153 - Male begger
154 - Male shaman
155 - Female pirate
156 - Female assassin
157 - Female begger
158 - Female shaman
159 - Elf
160 - Dwarf
161 - <Nothing>
162 - <Nothing>
163 - <Nothing>
164 - <Nothing>
165 - <Nothing>
166 - <Nothing>
167 - <Nothing>
168 - <Nothing>
169 - <Nothing>
170 - <Nothing>
171 - <Nothing>
172 - <Nothing>
173 - <Nothing>
174 - <Nothing>
175 - <Nothing>
176 - <Nothing>
177 - <Nothing>
178 - <Nothing>
179 - <Nothing>
180 - <Nothing>
181 - <Nothing>
182 - <Nothing>
183 - <Nothing>
184 - <Nothing>
185 - <Nothing>
186 - <Nothing>
187 - <Nothing>
188 - <Nothing>
189 - <Nothing>
190 - <Nothing>
191 - <Nothing>
192 - Carrion worm
193 - Enlighted of the cult
194 - Adept of the cult
195 - Pirate skeleton
196 - Pirate ghost
197 - Tortoise
198 - Thornback tortoise
199 - Mammoth
200 - Blood crab
201 - Demon
202 - Minotaur guard
203 - Elf arcanist
204 - Dragon lord
205 - Stone golem
206 - Monk
207 - Minotaur guard
208 - giant spider
209 - Necromancer
210 - Elder beholder
211 - Elephant
212 - Flamingo
213 - Purple butterfly
214 - Dworc voodoomaster
215 - Dworc fleshhunter
216 - Dworc venomsniper
217 - Parrot
218 - Terror bird
219 - Tarantula
220 - Serpent spawn
221 - Spit nettle
222 - Toad
223 - Seagull
224 - Green frog
225 - Monk
226 - Frog
227 - Blue butterfly
228 - Red butterfly
229 - Ferumbras
230 - Hand of cursed fate
231 - Undead dragon
232 - Lost soul
233 - Betrayed wraith
234 - Dark torturer
235 - Spectre
236 - Destroyer
237 - Diabolic imp
238 - Defiler
239 - Wyvern
240 - Hellhound
241 - Phantasm
242 - Blistering fire elemental
243 - Hellfire fighter
244 - Juggernaut
245 - Nightmare
246 - Blightwalker
247 - Plaguesmith
248 - Frost dragon
249 - Chakoya tribewarden
250 - Penguin
251 - Male norseman
252 - Female norsewoman
253 - Barbarian headsplitter
254 - Barbarian skullhunter
255 - Barbarian bloodwalker
256 - Braindeath
257 - Frost giant
258 - Husky
259 - Chakoya toolshaper
260 - Chakoya windcaller
261 - Ice golem
262 - Silver rabbit
263 - Crystal spider
264 - Barbarian brutetamer
265 - Frost giantess
266 - Comunity manager
267 - Swimming
268 - Male nightmare knight
269 - Female nightmare knight
270 - Female jester
271 - Dragon hatchling
272 - Dragon lord hatchling
273 - Male jester
274 - Squirrel
275 - Sea serpent
276 - Cat
277 - Cyclops smith
278 - Male brotherhood of bones
279 - Female brotherhood of bones
280 - Cyclops drone
281 - Troll champion
282 - Island troll
283 - Frost dragon hatchling
284 - Cockroach
285 - Massive earth elemental
286 - Water elemental
287 - Vampire overlord
288 - Female demonhunter
289 - Male demonhunter
290 - Massive energy elemental
291 - Wyrm
292 - Animated pumpkin
293 - Energy element
294 - Wisp
295 - Rotworm queen
296 - Goblin assassin
297 - Goblin scavanger
298 - Skeleton warrior
299 - Bog raider
300 - Grim reaper
301 - Earth element
302 - God
303 - Undead tortoise?
304 - Worker golem
305 - Mutated rat
306 - Undead gladiator
307 - Mutaded bat
308 - Werewolf
309 - Yalaharian
310 - Haunted treeling
311 - Zombie
312 - Vampire bride
313 - Gozzler
314 - Acid blob
315 - Death blob
316 - Mercury blob
317 - Young sea serpent
318 - Mutated tiger
319 - Haunted spirit
320 - Nightstalker
321 - Nightmare scion
322 - Hellspawn
323 - Mutaded human
324 - Female yalaharian
325 - Male yalaharian
326 - War golem
327 - ?
328 - Married
329 - New Female outfit
330 - Medusa
332 - King Tibianus
331 - Queen Eloise
333 - small Golem
334 - Draken Warmaster
335 - Male Warmaster
336 - Female Warmaster
337 - Lizard High Guard
338 - Lizard Legionnaire
339 - Lizard Dragon Priest
340 - Draken Spellweaver
341 - Gnarlhound
342 - Orc Marauder
343 - Battlemaster Zunzu
344 - Lizard Chosen
345 - ? (Eternal Guardian)
346 - Terramite
347 - Wailing Widow
348 - Lancer Beetle
349 - Insect Swarm
350 - Sandcrawler
351 - Ghastly Dragon
352 - Brimstone Bug
353 - Finger Killer
354 - Triple Medusa
355 - Souleater
356 - Snake God Essence
357 - Draken Abomination
358 - Killer Caiman
359 - Abomination Fury
360 - Phantom Lord
361 - Purple Turtle
362 - Draken Elite
363 - Butterfly Demon
364 - Lizard Abomination
365 - Living Plant
366 - Female Wayfarer
367 - Male Wayfarer
368 - Widow mount
369 - Racing Bird mount
370 - War Bear Mount
371 - Black sheep mount
372 - Midnight Panther mount
373 - Draptor mount
374 - Titanica mount
375 - Tin Lizzard mount
376 - Blazerbringer mount
377 - Rapid Boar mount
378 - Stampor mount
379 - Undead bear mount
380 - Rapid Boar
381 - Stampor
382 - Draptor
383 - Titanica
384 - Undead bear
385 - Midnight Panther
386 - New GM outfit
<?xml version="1.0"?>
<npc name="Vip Seller" script="data/npc/scripts/concertar advanced.lua" access="3" lookdir="2">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="195" head="24" body="114" legs="114" feet="114" addons="3"/>
</npc>
Agora va em npc/scripts crie 1 arquivo e cole isso:
local focus = 0
local talk_start = 0
local target = 0
local following = false
local attacking = false
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Good bye then.')
focus = 0
talk_start = 0
end
end
function onCreatureTurn(creature)
end
function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end
function onCreatureSay(cid, type, msg)
msg = string.lower(msg)
if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
selfSay('oi ' .. creatureGetName(cid) .. '!Eu vendo Vip por 250 crystal coin')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'vip') then
buy(cid,5957,getCount(msg),2500000)
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Good bye, ' .. creatureGetName(cid) .. '!')
focus = 0
talk_start = 0
end
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Next Please...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Good bye then.')
focus = 0
end
end
end
LEMBRANDO O VIP TICKET NESSE NPC E VENDIDO À 250 CRYSTAL COIN!!!
Coloque o npc no mapa...Lembrando na entrada vip coloque o action id 13540 no piso!!!
:button_ok: Vip Feito :button_ok:
Se voce tinha 1 area vip só seguir instruçoes se nao tem é so criar pois vale a pena
Editado Janeiro 31 por groku