-Inne Itemy na pocz?tek i dni premium!

Status
Zamknięty.

Hellu

User
Zarejestrowany
Dołączył
Grudzień 6, 2010
Posty
11
Liczba reakcji
0
Witam.

Jak ustawi? itemy na pocz?tek oraz dni premium nie chodzi mi o premium za free.

Pozdrawiam.
 
Odp: Itemy na pocz?tek i dni premium!

Itemy nie zbyt pami?tam ale my?l? ?e przed skonfigurowaniem acc makera postaw sobi? itemki na map edytorze. Jak skonfigurujesz acc makera to zaloguj si? na Sorcerer Sample itd i pozamieniaj im itemy. Potem kasujesz itemy z mapy w map edytorze. Co? takiego, je?li kto? potrafi to bardziej sprecyzowa? to prosz? pom?c koledze.
 
Odp: Itemy na pocz?tek i dni premium!

Na itemy jest kilka sposobow. Wrzucic plik firstitems w ktorym wymienisz itemy, dac itemy postaciom sample i zapisac w bazie, ze kazda taka postac ma te itemy albo dodac po prostu w bazie, co jest chyba najtrudniejsze jak nie ogarniasz.
Przykladowy plik firstitems.lua:
Kod:
local firstItems = {}
firstItems[0] =
{
2173,
2525,
3965,
2124,
2457,
2647,
2643
}
firstItems[1] =
{
2173,
2525,
2124,
8820,
2649,
2643,
8819
}
firstItems[2] =
{
2173,
2525,
2124,
8820,
2649,
2643,
8819
}
firstItems[3] =
{
2173,
2525,
2124,
2460,
8923,
2643,
2660,
}
firstItems[4] =
{
2173,
2525,
2124,
2460,
2478,
2643,
2465
}

function onLogin(cid)
if getPlayerStorageValue(cid, 30001) == -1 then
for i = 1, table.maxn(firstItems[getPlayerVocation(cid)]) do
doPlayerAddItem(cid, firstItems[getPlayerVocation(cid)][i], 1)
end
local bag = doPlayerAddItem(cid, 10521, 1)
doAddContainerItem(bag, 2160, 2)
doAddContainerItem(bag, 2554, 1)
doAddContainerItem(bag, 2120, 1)
doAddContainerItem(bag, 7618, 1)
setPlayerStorageValue(cid, 30001, 1)
end
return TRUE
end

Nie wiem do konca o co ci chodzi z tym premium. Chodzi ci o to, zeby kazde konto mialo na poczatku np 5 dni pacc? W configu ustawiasz free premium na "no", a w configu stronki ustawiasz, ze kazdse nowe konto ma dostawac 5 dni pacc i tyle. Jesli dobrze pamietam...
 
Odp: Itemy na pocz?tek i dni premium!

Witam.

Jak ustawi? itemy na pocz?tek oraz dni premium nie chodzi mi o premium za free.

Pozdrawiam.

Premium (np. 3 dni premium przy za?o?eniu konta) w config.php w acc makerze.
Itemy w postaciach Sample lub u?ywaj?c tego moda:

Napisane przez J.Dre, oryginalny link:
Notka moderatorska:
Advanced First Items (useSlot, useMessage, inContainer, slotType)
Notka moderatorska:


PHP:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="First Items" version="2.0" author="J.Dre" contact="j.dre@live.com" enabled="yes">
	<config name="firstitems_config"><![CDATA[
		commonItems = {
			{itemid=6103, count=1, useMessage=true}, -- a book (or whatever) with a message
			{itemid=2789, count=10, inContainer = true}, -- 10 brown mushrooms
			{itemid=2152, count=10, inContainer = true}, -- 10 platinum coins
			{itemid=2200, count=100}, -- protection amulet
			{itemid=2643} -- leather boots
		}
		firstItems = {
			{ -- Sorcerer	
				{itemid=1988}, -- backpack
				{itemid=2175}, -- spellbook
				{itemid=2190}, -- wand of vortex
				{itemid=8819}, -- magician's robe
				{itemid=8820}, -- mage hat
				{itemid=2468}, -- studded legs
				{itemid=7620, count=3, inContainer=true} -- mana potion
			},
			{ -- Druid
				{itemid=1988}, -- backpack
				{itemid=2175}, -- spellbook
				{itemid=2182}, -- snakebite rod
				{itemid=8819}, -- magician's robe
				{itemid=8820}, -- mage hat
				{itemid=2468}, -- studded legs
				{itemid=7620, count=3, inContainer=true} -- mana potion
			},
			{ -- Paladin
				{itemid=1988}, -- backpack
				{itemid=2456, count=1, useSlot=true, slotType=CONST_SLOT_LEFT}, -- bow
				{itemid=2544, count=100, useSlot=true, slotType=CONST_SLOT_LAST}, -- 100 arrow's
				{itemid=2660}, -- ranger's cloak
				{itemid=2481}, -- soldier helmet
				{itemid=8923}, -- ranger legs
				{itemid=7618, count=1, inContainer=true}, -- health potion
				{itemid=7620, count=2, inContainer=true} -- mana potion
			},
			{ -- Knight
				{itemid=1988}, -- backpack
				{itemid=2509}, -- steel shield
				{itemid=8602}, -- jagged sword
				{itemid=8601, inContainer=true}, -- steel axe
				{itemid=2439, inContainer=true}, -- daramanian mace
				{itemid=2465}, -- brass armor
				{itemid=2481}, -- soldier helmet
				{itemid=2478}, -- brass legs
				{itemid=7618, count=3, inContainer=true} -- health potion
			}
		}
	]]></config>
	<event type="login" name="FirstItems" event="script"><![CDATA[
		domodlib('firstitems_config')
 
		for _, items in ipairs(firstItems) do
			for _, item in ipairs(commonItems) do
				table.insert(items, item)
			end
		end
 
		function onLogin(cid)
			if(getPlayerAccess(cid) < 3 and (getPlayerLastLoginSaved(cid) < 1) and firstItems[getPlayerVocation(cid)]) then
				for _, v in ipairs(firstItems[getPlayerVocation(cid)]) do
					if isItemContainer(v.itemid) then
						backpack = doPlayerAddItem(cid, v.itemid, 1, false)
					elseif v.inContainer then
						doAddContainerItem(backpack, v.itemid, v.count or 1)
					elseif v.useSlot then
						doPlayerAddItem(cid, v.itemid, v.count, false, v.slotType)
					elseif v.useMessage then
						local t, k = {
							writer = "Server Staff", date = os.time(),
							text = "Welcome " .. getCreatureName(cid) .. ".\n\nOur community would like to welcome you to " .. getConfigValue('serverName') .. ". If you need help with anything, please refer to the help channel.\n\nEnjoy your time!"
						}, doPlayerAddItem(cid, v.itemid, v.count or 1, false)
						doSetItemText(k, t.text, t.writer, t.date)
					else
						doPlayerAddItem(cid, v.itemid, v.count or 1)
					end
				end
			end
 
			return true
		end
	]]></event>
</mod>

Mo?esz tu sobie ustawi? itemy na pocz?tek dla ka?dej profesji inne.

Je?li pomog?em to REP++ :P
 
Odp: Itemy na pocz?tek i dni premium!

ok dzi?ki wszystkim, do zamkni?cia.
 
Status
Zamknięty.
Back
Do góry