• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

addons for gold|25gps when player dies|skulls per kill

IMac

entrepreneur
Joined
May 31, 2009
Messages
2,482
Reaction score
16
Location
Pluto
i need an npc that for first addon asks for 100gp and second addon asks for 200gps for example

player: hi
npc: hello |player name| i sell all addons. 100gps for first and 200gps for second.
player: first addon
npc: here you are.
____________________________________________________________
my second request is evertime you kill a player you get 25gps from that player as reward of death(i found a script similar but it gives the heart and i dont want no heart)
_____________________________________________________________
and last but not list i need a script that depends on how many kills you got u get a skull example
10 kills white skull
20 kills red skull
30 kills black skull

thanks
 
  1. Code:
    local keywordHandler = KeywordHandler:new()
    local npcHandler = NpcHandler:new(keywordHandler)
    NpcSystem.parseParameters(npcHandler)
    
    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 buyAddons(cid, message, keywords, parameters, node)
    	--TODO: buyAddons function in modules.lua
    	if(not npcHandler:isFocused(cid)) then
    		return false
    	end
    
    	local addon = parameters.addon
    	local cost = parameters.cost
    	local premium = (parameters.premium ~= nil and parameters.premium)
    
    	if isPlayerPremiumCallback == nil or (isPlayerPremiumCallback(cid) and premium) then
    		if doPlayerRemoveMoney(cid, cost) then
    			doPlayerAddAddons(cid, addon)
    			npcHandler:say('There, you are now able to use all addons!', cid)
    		else
    			npcHandler:say('Sorry, you do not have enough money.', cid)
    		end
    	else
    		npcHandler:say('I only serve customers with premium accounts.', cid)
    	end
    
    	keywordHandler:moveUp(1)
    	return true
    end
    
    local node1 = keywordHandler:addKeyword({'first'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the first addons set for 100 gold coins?'})
    	node1:addChildKeyword({'yes'}, buyAddons, {addon = 1, cost = 100, premium = true})
    	node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Too expensive, eh?'})
    
    local node2 = keywordHandler:addKeyword({'second'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to buy the second addons set for 200 gold coins?'})
    	node2:addChildKeyword({'yes'}, buyAddons, {addon = 2, cost = 200, premium = true})
    	node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Too expensive, eh?'})
    
    keywordHandler:addKeyword({'addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell the {first} addons set for 100 gold coins and the {second} addons set for 200 gold coins.'})
    
    npcHandler:addModule(FocusModule:new())
  2. Code:
    function onKill(cid, target, lastHit)
    	if isPlayer(target) and lastHit then
    		doPlayerAddItem(cid, 2148, 25)
    	end
    	return true
    end
    Code:
    	<event type="kill" name="PlayerKill" event="script" value="kill.lua"/>
    Code:
    	registerCreatureEvent(cid, "PlayerKill")
  3. Source edit
 
login.lua
Code:
for i = 0, 4 do
	doPlayerSetLossPercent(cid, i, 0)
end
Players won't lose level (exp), magic level (spent mana), skills, containers nor items.
 
login.lua
Code:
for i = 0, 4 do
	doPlayerSetLossPercent(cid, i, 0)
end
Players won't lose level (exp), magic level (spent mana), skills, containers nor items.

ah they gotta loose exp tho cus its a pvp-e server i only want it so they wont loose skills/items but they loose exp is it possible?
 
Back
Top