Poszukuj? skrypt na first items.

Status
Zamknięty.

Xeranek

User
Zarejestrowany
Dołączył
Marzec 16, 2010
Posty
29
Liczba reakcji
0
Witam
Poszukuje skrypta, ktory np. druidowi daje eq, p legs, bp mana itp.. a knightowi np. bp heltow knight legs.

Za pomoc reput+ :)
 
Odp: Poszukuj? skrypt na first items.

Skrypt ten mo?esz sobie sam edytowa? znajduje si? w on w folderze mods.
 
Odp: Poszukuj? skrypt na first items.

a mozesz jakis pordanik podeslac?
 
Odp: Poszukuj? skrypt na first items.

Tu masz skrypt, wklejasz go do katalogu mods, jestem przekonany ?e masz ten folder.

Kod:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="First Items" version="1.0" author="The Forgotten Server" contact="otland.net" enabled="yes">
	<config name="firstitems_config"><![CDATA[
		config = {
			storage = 30001,
			items = {2050, 2382}
		}
	]]></config>
	<event type="login" name="FirstItems" event="script"><![CDATA[
		domodlib('firstitems_config')

		function onLogin(cid)
			if(getPlayerStorageValue(cid, config.storage) > 0) then
				return true
			end

			for _, id in ipairs(config.items) do
				doPlayerAddItem(cid, id, 1)
			end

			if(getPlayerSex(cid) == PLAYERSEX_FEMALE) then
				doPlayerAddItem(cid, 2651, 1)
			else
				doPlayerAddItem(cid, 2650, 1)
			end

			doAddContainerItem(doPlayerAddItem(cid, 1987, 1), 2674, 1)
			setPlayerStorageValue(cid, config.storage, 1)
			return true
		end
	]]></event>
</mod>

Je?eli chcesz doda? inne itemy po prostu dopisujesz:

Kod:
doPlayerAddItem(cid, id_itema, 1)
 
Odp: Poszukuj? skrypt na first items.

a jak zrobic zevy gracz dostal w bp np. 5 itemkow?
 
Odp: Poszukuj? skrypt na first items.

PHP:
local container = doPlayerAddItem(cid, id_backpacka, 1)
doAddContainerItem(container, id_itema, ilosc_itema)
@2x UP
Tak, tutaj dodaje si? itemy ale nie lepiej tutaj, po przecinku?
PHP:
items = {2050, 2382}
...
Mo?esz tak?e doda? r??ne warunki np. Je?li b?dzie mia? sorca to da np wand of vortex... Tutaj masz przyk?ad:
Zamiast:
PHP:
if(getPlayerSex(cid) == PLAYERSEX_FEMALE) then
	doPlayerAddItem(cid, 2651, 1)
else
	doPlayerAddItem(cid, 2650, 1)
end
Wklej:
PHP:
local playerVocation = getPlayerVocation(cid)
if(playerVocation == 1) then
	doPlayerAddItem(cid, 2190, 1)	<!-- Dodaje wand of vortex je?li jest Sorciem -->
elseif(playerVocation == 2) then
	doPlayerAddItem(cid, 2182, 1)	<!-- Dodaje snakebite roda je?li jest Druidem -->
elseif(playerVocation == 3) then
	doPlayerAddItem(cid, 2389, 10)	<!-- Dodaje 10 spear?w je?li jest Paladinem -->
elseif(playerVocation == 4) then
	doPlayerAddItem(cid, 2412, 1) <!-- Dodaje katane je?li jest Knightem -->
end

Je?li b?dziesz czego? potrzebowa? to napisz - pomog? :)

Pozdrawiam,
Don Muha.
 
Ostatnia edycja:
Odp: Poszukuj? skrypt na first items.

doAddContainerItem(doPlayerAddItem(cid, 1988, 1), 2160, 1)

mam takie cos w firstitems.xml 1988 id backpacka, 2160,1 =cc i jak tu dodac aby w bp bylo wiecej itemkow?? probowalem tak to silnik wywalalo:
doAddContainerItem(doPlayerAddItem(cid, 1988, 1), 2160, 1), 2164, 1) -||-
 
Odp: Poszukuj? skrypt na first items.

PHP:
local items = {2222, 2345, 2443}
local count = {1,1,1}
local container = doPlayerAddItem(cid, id_backpacka, 1)
for i = 1, #items do
	doAddContainerItem(container, tabelka[i], count[i])
end
W tabelce items (local items = {2222, 2345, 2443}) aby zmieniasz id item?w albo dodajesz kolejne i w count ich ilo??.
Pami?taj! Je?li w tabelce items b?d? 3 itemy to w tabelce count musz? by? te? 3 warto??i...
 
Ostatnia edycja:
Status
Zamknięty.
Back
Do góry