• 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!

2 things

dualshock3

New Member
Joined
May 14, 2010
Messages
89
Reaction score
3
hi,
1-i need help with a blessing system, i would like a bless system of stamina.
ex: player A has 48 hours of stamina if he get killed by a monster he stays with the 48 hours of stamina, but if he get killed by another player he lose 24 hours of stamina, and if he get killed again by a player, he lose another 24 hours of stamina (remaining hours 0), and if he get killed again by another player he starts to lose 1% of levels each dead without stamina (killed by players only)

so to avoid losing levels the player A will have to say !stamina and 24 hours of stamina will be added, the cost of 24 hours of stamina is 10,000 gps, thats to balance economy.

2-and the other thing i want is a NPC that give information about the ubication of the addon levers

thank in advance, i wil rep++++++++++++++++++++:)
 
2-
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Helper" script="data/npc/scripts/Helper.lua" walkinterval="5000" floorchange="0" speed="500">
    <health now="100" max="100"/>
    <look type="133" head="78" body="114" legs="77" feet="0" addons="3"/>
    <parameters>
		<parameter key="message_greet" value="Hello welcome!|PLAYERNAME|! If you need help say {help}" />
        <parameter key="module_keywords" value="1" />
        <parameter key="keywords" value="hi;help;bye;addons" />
        <parameter key="keyword_reply1" value="Hello welcome!|PLAYERNAME|! I can help you in lots of things 1313. Say {help}" />
        <parameter key="keyword_reply2" value="Would you like to know about the {addons}?" />
        <parameter key="keyword_reply3" value="Good Bye!" />
        <parameter key="keyword_reply4" value="Well, the ubication of the addon switches is in xxxxx(?!." /> ----------- Put where they are

Then at data/npc/scripts/helper.lua

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 thinkCallback(cid)
local rand = math.random(1,100)
if rand == 1 then
selfSay('Hi! Welcome, May I help you in something?')
end
return true
end

function greetCallback(cid)

return true

end
 
npcHandler:setCallback(CALLBACK_ONTHINK, thinkCallback)
npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:addModule(FocusModule:new())


Idk about the nr 1.
Rep me if i helped
 
thanks, but
how can i do this
ex1:
PlayerA:hi
Npc:Hello welcome!PlayerA! I can help you in lots of things . Say {help}
PlayerA:help
Npc:Would you like to know about were the addon levers are, wich addon would you like to know the ubication?
PlayerA:warrior
Npc: So you want to know were the warrior addon is, it is at dragons cave, you need 1 sword and 2 spikes.
PlayerA:bye
Npc:Good Bye!

ex2:

PlayerB:hi
Npc:Hello welcome!PlayerB! I can help you in lots of things . Say {help}
PlayerB:help
Npc:Would you like to know about were the addon levers are, wich addon would you like to know the ubication?
PlayerB:summoner
Npc: So you want to know were the summoner addon is, it is at the alchemist tower, you need 1 antidote potion,1 health potion and 1 mana potion.
PlayerB:bye
Npc:Good Bye!

------------------------------------------------------=------------------------------------------


do you know how to make smp heal mana depending on the ml of the player?
 
Last edited:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Helper" script="data/npc/scripts/Addon Helper.lua" walkinterval="5000" floorchange="0" speed="500">
    <health now="100" max="100"/>
    <look type="133" head="78" body="114" legs="77" feet="0" addons="3"/>
    <parameters>
		<parameter key="message_greet" value="Hello welcome!|PLAYERNAME|! If you need help say {help}" />
        <parameter key="module_keywords" value="1" />
        <parameter key="keywords" value="hi;help;bye;addons;more;more;citizen;hunter;mage;knight;nobleman;summoner;warrior;barbarian;druid;wizard;oriental;pirate;assassin;beggar;shaman;norseman;nightmare;jester;brotherhood;demonhunter;yalaharian;warmaster" />
        <parameter key="keyword_reply1" value="Hello welcome!|PLAYERNAME|! I can help you in lots of things 1313. Say {help}" />
        <parameter key="keyword_reply2" value="Would you like to know about the {addons}?" />
        <parameter key="keyword_reply3" value="Good Bye!" />
        <parameter key="keyword_reply4" value="What addon ubication would you like to know? {citizen}, {hunter}, {mage}, {knight}, {nobleman}, {summoner}, {warrior}, {barbarian} or {more}?." />	
	  <parameter key="keyword_reply5" value="{druid}, {wizard}, {oriental}, {pirate}, {assassin}, {beggar}, {shaman}, {norseman} or {more}?" />
	  <parameter key="keyword_reply6" value="{nightmare}, {jester}, {brotherhood}, {demonhunter}, {yalaharian} or {warmaster}?" /> 
	  <parameter key="keyword_reply7" value="citizen addon can be found at (?), you need (?)" />
	  <parameter key="keyword_reply8" value="hunter addon can be found at (?), you need (?)" />
	<parameter key="keyword_reply9" value="mage addon can be found at (?), you need (?)" />
<parameter key="keyword_reply10" value="knight addon can be found at (?), you need (?)" />
<parameter key="keyword_reply11" value="nobleman addon can be found at (?), you need (?)" />
<parameter key="keyword_reply12" value="summoner addon can be found at (?), you need (?)" />
<parameter key="keyword_reply13" value="warrior addon can be found at (?), you need (?)" />
<parameter key="keyword_reply14" value="barbarian addon can be found at (?), you need (?)" />
<parameter key="keyword_reply15" value="druid addon can be found at (?), you need (?)" />
<parameter key="keyword_reply16" value="wizard addon can be found at (?), you need (?)" />
<parameter key="keyword_reply17" value="oriental addon can be found at (?), you need (?)" />
<parameter key="keyword_reply18" value="pirate addon can be found at (?), you need (?)" />
<parameter key="keyword_reply20" value="assassin addon can be found at (?), you need (?)" />
<parameter key="keyword_reply21" value="beggar addon can be found at (?), you need (?)" />
<parameter key="keyword_reply22" value="shaman addon can be found at (?), you need (?)" />
<parameter key="keyword_reply23" value="norseman addon can be found at (?), you need (?)" />
<parameter key="keyword_reply24" value="nightmare addon can be found at (?), you need (?)" />
<parameter key="keyword_reply25" value="jester addon can be found at (?), you need (?)" />
<parameter key="keyword_reply26" value="brotherhood addon can be found at (?), you need (?)" />
<parameter key="keyword_reply27" value="demonhunter addon can be found at (?), you need (?)" />
<parameter key="keyword_reply28" value="yalaharian addon can be found at (?), you need (?)" />
<parameter key="keyword_reply29" value="warmaster addon can be found at (?), you need (?)" />

data/npc/scripts/Addon Helper.lua

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 thinkCallback(cid)
local rand = math.random(1,100)
if rand == 1 then
selfSay('Hi! Welcome, May I help you in addons?')
end
return true
end

function greetCallback(cid)

return true

end
 
npcHandler:setCallback(CALLBACK_ONTHINK, thinkCallback)
npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:addModule(FocusModule:new())

Ok try that. Rep+ if i helped.
 
i tryed and i get this error:


data/npc/addon demonic.xml:36: parser error : Premature end of data in tag param
eters line 5
y="keyword_reply29" value="warmaster addon can be found at (?), you need (?)" />
data/npc/addon demonic.xml:36: parser error : Premature end of data in tag npc l
ine 2
y="keyword_reply29" value="warmaster addon can be found at (?), you need (?)" />
[Warning - Npc::loadFromXml] Cannot load npc file (data/npc/addon demonic.xml).
Line: 36, Info: Premature end of data in tag npc line 2


SOLVED
 
Last edited:
SOLVED

new code

data/npc/helper.xml

Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Jack" script="data/npc/scripts/addon helper.lua" walkinterval="2000" floorchange="0">
    <health now="100" max="100"/>
    <look type="134" head="57" body="59" legs="40" feet="76" addons="3"/>
    <parameters>
        <parameter key="message_greet" value="Hello welcome!|PLAYERNAME|! If you need help say {help}" />
        <parameter key="module_keywords" value="1" />
        <parameter key="keywords" 

value="hi;help;bye;addons;citizen;hunter;mage;knight;nobleman;summoner;warrior;barbarian;druid;wizard;oriental;pirate;assass

in;beggar;shaman;norseman;nightmare;jester;brotherhood;demonhunter;yalaharian;warmaster" />
        <parameter key="keyword_reply1" value="Hello welcome!|PLAYERNAME|! I can help you in lots of things. Say {help}" />
        <parameter key="keyword_reply2" value="Would you like to know about the {addons}?" />
        <parameter key="keyword_reply3" value="Good Bye!" />
        <parameter key="keyword_reply4" value="What addon ubication would you like to know? {citizen}, {hunter}, {mage}, 

{knight}, {nobleman}, {summoner}, {warrior}, {barbarian} , {druid}, {wizard}, {oriental}, {pirate}, {assassin}, {beggar}, 

{shaman}, {norseman} , {nightmare}, {jester}, {brotherhood}, {demonhunter}, {yalaharian} or {warmaster}?" /> 
      <parameter key="keyword_reply5" value="citizen addon can be found at (?), you need (?)" />
      <parameter key="keyword_reply6" value="hunter addon can be found at (?), you need (?)" />
    <parameter key="keyword_reply7" value="mage addon can be found at (?), you need (?)" />
<parameter key="keyword_reply8" value="knight addon can be found at (?), you need (?)" />
<parameter key="keyword_reply9" value="nobleman addon can be found at (?), you need (?)" />
<parameter key="keyword_reply10" value="summoner addon can be found at (?), you need (?)" />
<parameter key="keyword_reply11" value="warrior addon can be found at (?), you need (?)" />
<parameter key="keyword_reply12" value="barbarian addon can be found at (?), you need (?)" />
<parameter key="keyword_reply13" value="druid addon can be found at (?), you need (?)" />
<parameter key="keyword_reply14" value="wizard addon can be found at (?), you need (?)" />
<parameter key="keyword_reply15" value="oriental addon can be found at (?), you need (?)" />
<parameter key="keyword_reply16" value="pirate addon can be found at (?), you need (?)" />
<parameter key="keyword_reply17" value="assassin addon can be found at (?), you need (?)" />
<parameter key="keyword_reply18" value="beggar addon can be found at (?), you need (?)" />
<parameter key="keyword_reply19" value="shaman addon can be found at (?), you need (?)" />
<parameter key="keyword_reply20" value="norseman addon can be found at (?), you need (?)" />
<parameter key="keyword_reply21" value="nightmare addon can be found at (?), you need (?)" />
<parameter key="keyword_reply22" value="jester addon can be found at (?), you need (?)" />
<parameter key="keyword_reply23" value="brotherhood addon can be found at (?), you need (?)" />
<parameter key="keyword_reply24" value="demonhunter addon can be found at (?), you need (?)" />
<parameter key="keyword_reply25" value="yalaharian addon can be found at (?), you need (?)" />
<parameter key="keyword_reply26" value="warmaster addon can be found at (?), you need (?)" />
</parameters> 
</npc>
 
Back
Top