What's new

Szukam] pokazuje ilosc rebow pod nickiem na look.

Status
Not open for further replies.

ROKI721

User
Joined
Apr 23, 2013
Messages
36
Reaction score
0
Witam
Tak jak w opisie, szukam skryptu do reb systemu. Wyjasnie na czym polega.
Gdy klikn? na kogo? look jest napisane np: On ma 1 reborn albo on ma 54 rebornow.

Reborn jest na zasadzie wbicia lvl wpisania danej komendy i po wpisaniu resetuje level do jakiego? tam , mniejsza o to.:wink:

skrypt o kt?ry prosz? dzia?a na zasadzie onlook , je?eli sie nie myl? to chyba w creaturescripts.

Tibia 8.60
silnik TheforgottenserverV5.


Pozdrawiam wszystkich uzytkownik?w tnp oraz administracje.

Nie pisa? durnych i ?miesznych komentarzy typu < wujek google > < poczytaj poradniki > itp. je?eli nie wiesz to nie musisz nic pisa?.
 

Kahras

Senior User
Joined
Aug 26, 2011
Messages
2,714
Reaction score
167
Age
25
Odp: Szukam] pokazuje ilosc rebow pod nickiem na look.

Ahhh...

Reborny si? zapisuj? si? w bazie danych czy na storage?
najlepiej b?dzie jak dasz ten skrypt na reborn.
 

ROKI721

User
Joined
Apr 23, 2013
Messages
36
Reaction score
0
Odp: Szukam] pokazuje ilosc rebow pod nickiem na look.

storage o wartosci 2500

Edit@ Reborn Jest zrobiony pod npc.

Code:
local 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
 
function creatureSayCallback(cid, type, msg)
	if(not npcHandler:isFocused(cid)) then
		return false
	end
 
	local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
 
	if(msgcontains(msg, 'reborn')) then
		selfSay('Are you ready to prestige and start a new life?', cid)
		talkState[talkUser] = 1
	elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then
		-------CONFIGS-------
		local level = 717217
		local cost = 0
		------/CONFIGS-------
		-----LOCALS-----
		local id = getPlayerGUID(cid)
		local name = getCreatureName(cid)
		local vocation = getPlayerVocation(cid)
		local storage = getCreatureStorage(cid, 2500)
		----/LOCALS-----
		if(getPlayerLevel(cid) >= level) then
			if(doPlayerRemoveMoney(cid, cost) == TRUE) then
				if(isInArray({1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, vocation)) then
					doCreatureSetStorage(cid, 85987, storage == -1 and 1 or storage + 1)
					doRemoveCreature(cid)
					db.executeQuery("UPDATE `players` SET `level` = 8, `experience` = 4200, `promotion` = 0 WHERE `id` ='"..id.."';")
					db.executeQuery("UPDATE `players` SET `name` = '"..name.."' WHERE `id` ='"..id.."';")
				else
					selfSay('Please talk with Forgotten King and promote first.', cid)
					talkState[talkUser] = 0
				end
			else
				selfSay('You don\'t have enough money. You need to pay 1 gold coin to be rebirthed.', cid)
				talkState[talkUser] = 0
			end
		else
			selfSay('Only characters of level 717217 or higher can be rebirthed.', cid)
			talkState[talkUser] = 0
		end
	elseif(msgcontains(msg, 'no') and talkState[talkUser] == 1) then
		selfSay('Okey. Come back when you feel ready.', cid)
		talkState[talkUser] = 0
	end
 
	return true
end
 
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new()


Pozdrawiam
 
Last edited:

ROKI721

User
Joined
Apr 23, 2013
Messages
36
Reaction score
0
Odp: Szukam] pokazuje ilosc rebow pod nickiem na look.

Dzieki na reputa zeby ci dac mam za malo postow. Ale dzieki wielkie.

Edit@
Takie pytanie jak tu ustawic stages? mam np 0.9 to znaczy ze? Nie wiem na przyklad za moba jest 4200 exp i to jest 1.0 tak? Jak to ustawic mozesz wytlumaczyc?
Code:
local rates = {
    	[1] = {rate = 0.95},
        [2] = {rate = 0.9},
        [3] = {rate = 0.85},
        [4] = {rate = 0.8},
        [5] = {rate = 0.75},
        [6] = {rate = 0.7},
        [7] = {rate = 0.65},
        [8] = {rate = 0.60},
        [9] = {rate = 0.55},
        [10] = {rate = 0.5}
}
 
local v = rates[getPlayerRebirth(cid)]
if v then
	doPlayerSetRate(cid, SKILL__LEVEL, v.rate)
end

Edit2@ po zamiane highscores.php wyskakuje mi blad na stronie
Code:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'rebirths' in 'field list'' in C:\xampp\htdocs\highscores.php:73 Stack trace: #0 C:\xampp\htdocs\highscores.php(73): PDO->query('SELECT name,onl...') #1 C:\xampp\htdocs\index.php(124): include('C:\xampp\htdocs...') #2 {main} thrown in C:\xampp\htdocs\highscores.php on line 73
 
Last edited:
Status
Not open for further replies.
Top