-Skrypt Skrypt na Komende /i ~~~Reput!!!

Status
Zamknięty.

Quomak

Senior User
Zarejestrowany
Dołączył
Lipiec 15, 2010
Posty
631
Liczba reakcji
39
Wiek
12
Witam jak w temacie poszukuje skryptu na komende /i lub czegos zblizonego ae zeby ylo tylko dla acces 5 za pomoc reput z gory dziekuje Quomak!
 
Odp: Skrypt na Komende /i ~~~Reput!!!

W pliku talkactions.xml musisz dodac to:
Kod:
access="5"
poka?e to na przyk?adzie :
Kod:
<talkaction words="/addskill" access="5" event="script" value="skill.lua"/>
 
Odp: Skrypt na Komende /i ~~~Reput!!!

W pliku talkactions.xml musisz dodac to:
Kod:
access="5"
poka?e to na przyk?adzie :
Kod:
<talkaction words="/addskill" access="5" event="script" value="skill.lua"/>

@UP
Wtf ?
Autor prosi? o co? innego !
"/i" to jest na robienie itemek a widzisz co ty doda?e? ?:D

Do talkactions.xml dodaj:
PHP:
<talkaction log="yes" words="/i" access="5" event="script" value="createitem.lua"/>
Do data/talkactions/createitem.lua

PHP:
function onSay(cid, words, param, channel)
    if(param == '') then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
        return true
    end

    local t = string.explode(param, ",")
    local ret = RETURNVALUE_NOERROR
    local pos = getCreaturePosition(cid)

    local id = tonumber(t[1])
    if(not id) then
        id = getItemIdByName(t[1], false)
        if(not id) then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.")
            return true
        end
    end

    local amount = 100
    if(t[2]) then
        amount = t[2]
    end

    local item = doCreateItemEx(id, amount)
    if(t[3] and getBooleanFromString(t[3])) then
        if(t[4] and getBooleanFromString(t[4])) then
            pos = getCreatureLookPosition(cid)
        end

        ret = doTileAddItemEx(pos, item)
    else
        ret = doPlayerAddItemEx(cid, item, true)
    end

    if(ret ~= RETURNVALUE_NOERROR) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Couldn't add item: " .. t[1])
        return true
    end

    doDecayItem(item)
    if(not isPlayerGhost(cid)) then
    end

    return true
end

Komenda dzia?a na zasadzie:
/i ID,ilo??
np.
/i 2160,1

Pozdrawiam ! Bajo !
​

@Down
Ju? da?em :D
 
Ostatnia edycja:
Odp: Skrypt na Komende /i ~~~Reput!!!

aaa nie zrozumia?em autora tematu to dodaje poprawn? odpowiedz, UP zapomnia?e? o kodzie skryptu.lua :p

plik createitem.lua
PHP:
function onSay(cid, words, param, channel)
	if(param == '') then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
		return true
	end

	local t = string.explode(param, ",")
	local ret = RETURNVALUE_NOERROR
	local pos = getCreaturePosition(cid)

	local id = tonumber(t[1])
	if(not id) then
		id = getItemIdByName(t[1], false)
		if(not id) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.")
			return true
		end
	end

	local amount = 100
	if(t[2]) then
		amount = t[2]
	end

	local item = doCreateItemEx(id, amount)
	if(t[3] and getBooleanFromString(t[3])) then
		if(t[4] and getBooleanFromString(t[4])) then
			pos = getCreatureLookPosition(cid)
		end

		ret = doTileAddItemEx(pos, item)
	else
		ret = doPlayerAddItemEx(cid, item, true)
	end

	if(ret ~= RETURNVALUE_NOERROR) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Couldn't add item: " .. t[1])
		return true
	end

	doDecayItem(item)
	if(not isPlayerGhost(cid)) then
	end

	return true
end
Talkactions.xml
Kod:
<talkaction words="/i" access="5" event="script" value="createitem.lua"/>
 
Status
Zamknięty.
Back
Do góry