What's new

Skrypty & Kody Simple quests ;d

Status
Not open for further replies.

ctxtm

Advanced User
Joined
Jan 7, 2010
Messages
329
Reaction score
11
Przekopiowa?em zwyk?y skrypt na questy z skrzynki ze swojego starego silnika 8.1 do 8.54 bo mi tam tego brakowa?o. Tylko dzia?a dziwnie ^ ^

Code:
 -- simple quests based on uniqueId
-- to make quest create chest on map and set its uniqueId to id of quest item

function onUse(cid, item, frompos, item2, topos)
	prize = item.uid
	count = item.actionid

	if prize > 0 and prize < 7000 then
		queststatus = getPlayerStorageValue(cid,prize)

		if queststatus == -1 then
			if count > 1 then
				doPlayerSendTextMessage(cid,22,'You have found '.. count ..' of ' .. getItemName(prize) .. '.')
				doPlayerAddItem(cid,prize,count)
				setPlayerStorageValue(cid,prize,1)
			else
				doPlayerSendTextMessage(cid,22,'You have found a ' .. getItemName(prize) .. '.')
				doPlayerAddItem(cid,prize,1)
				setPlayerStorageValue(cid,prize,1)
			end
		else
			doPlayerSendTextMessage(cid,22,"It is empty.")
		end

		return 1
	else
		return 0
	end
end

Oto skrypt a problem jest taki, ?e jak bior? itemek z questa to mam napis You have found a chest.. a nie przykladowo You have found a longsowrd. Czy te? You have found 100 of chest. zamiast 100arrows. Prosz? o pomoc ;s
 

Cl3an

Active User
Joined
Apr 13, 2011
Messages
131
Reaction score
12
Odp: Simple quests ;d

b??d tkwi prawdopodobnie w prize = item.uid, kt?re? z tych zmiennych zamiast id przedmiotu bierze id skrzynki st?d te chest.Spr?buj zamiast prize = item.uid wpisa? prize = xxxx<id longsworda
Je?li si? myl? prosz? mnie poprawi?.
Pozdrawiam,
Cl3an
 

ctxtm

Advanced User
Joined
Jan 7, 2010
Messages
329
Reaction score
11
Odp: Simple quests ;d

To raczej tak nie zadzia?a.. Nawet je?li to na otsie jest przyk?adowo kilkadziesi?t skrzynek, i dla ka?dej pisa? osobny skrypt nie mia?oby najmniejszego sensu
 

Oskar

Forum friend
Joined
Jan 24, 2009
Messages
2,256
Reaction score
331
Odp: Simple quests ;d

Nadajesz skrzynce uid jako itemId nagrody oraz actionid jako jej ilo??. To raz. Dwa to zmie? getItemName(prize) na getItemInfo(prize).name
 

ctxtm

Advanced User
Joined
Jan 7, 2010
Messages
329
Reaction score
11
Odp: Simple quests ;d

Nadajesz skrzynce uid jako itemId nagrody oraz actionid jako jej ilo??. To raz. Dwa to zmie? getItemName(prize) na getItemInfo(prize).name

Co do aid i uid to wiem bo nagrod? dostawa?o si? normalnie by? tylko b??d z wy?wietlaniem, zamiana na getItemInfo(prize).name pomog?a. Tak wi?c dzi?ki. ;)
@Do zamkni?cia
 
Status
Not open for further replies.
Top