Can anyone help me?
I am looking for days and I do not!
The id of the coin is 6527
I have this script here, but it is not sufficient because it only sells for GPS!
and I need it sold exactly 30 days, for 100 coins vips!
The sript is in Portuguese because it was the only one I found!
I am looking for days and I do not!
The id of the coin is 6527
I have this script here, but it is not sufficient because it only sells for GPS!
and I need it sold exactly 30 days, for 100 coins vips!
The sript is in Portuguese because it was the only one I found!
Code:ocal keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local node1 = keywordHandler:addKeyword({'vip'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Se Você Quise Compra Vip So Fala { days } .'}) function creatureSayCallback(cid, type, msg) p = 10000 -- Valor Da Premium account Em GP if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid ---------- MSGs ---------- if msgcontains(msg, 'premium') or msgcontains(msg, 'Premium') or msgcontains(msg, 'premium') or msgcontains(msg, 'Premium Accounts') or msgcontains(msg, 'days') then selfSay('Pois Bem , Cada Dia De Vip Custa '..p..' GPs, Quantos Dias Você Deseja Comprar?', cid) talkState[talkUser] = 1 ---== compra por GPs ==--- elseif talkState[talkUser] == 1 then if getNumber(msg) < 350 then n = getNumber(msg) if n ~= 0 then if getPlayerMoney(cid) > p*n then selfSay('Dias de Vip: {'..n..'} por {'..n*(p)..'} GPs?', cid) talkState[talkUser] = 3 else selfSay('Você Nao Tem Gold Suficientes Para Comprar {'..n..'} Dias De Vip.', cid) talkState[talkUser] = 0 end else selfSay('Escolha Um Numero Acima De Zero.', cid) talkState[talkUser] = 0 end else selfSay('Você Nao Pode Comprar Mais Que 350 Dias De Vip.', cid) talkState[talkUser] = 0 end elseif talkState[talkUser] == 3 then ---== GPs ==--- if msgcontains(msg, 'yes') or msgcontains(msg, 'sim') or msgcontains(msg, 'SIM') or msgcontains(msg, 'YES') then if getPlayerPremiumDays(cid)+n <= 350 then if (doPlayerRemoveMoney(cid, p*n) ~= TRUE) then npcHandler:say('Voce Nao Tem Gold Suficientes!', cid) talkState[talkUser] = 0 else doPlayerAddPremiumDays(cid, n) selfSay('Compra Efetuada Com Sucesso , Dias De Vip:{ '..n..' }.', cid) talkState[talkUser] = 0 end else npcHandler:say('Voce Nao Pode Ter Mais Que 350 Dias De Vip!', cid) talkState[talkUser] = 0 end end elseif msgcontains(msg, 'no') or msgcontains(msg, 'nao') or msgcontains(msg, 'não') or msgcontains(msg, 'NO') or msgcontains(msg, 'NAO') or msgcontains(msg, 'NÃO')then selfSay('Tudo Bem.', cid) talkState[talkUser] = 0 end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) -- function maded by Gesior-- function getNumber(txt) --return number if its number and is > 0, else return 0 x = string.gsub(txt,"%a","") x = tonumber(x) if x ~= nill and x > 0 then return x else return 0 end end [/QUOTE]
Last edited: