• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua 2 doubts -1 script - 1 npc

Vikarious

New Member
Joined
Dec 16, 2008
Messages
93
Reaction score
2
Hello people I have one small question about NPC Soya, when I put crown armor like sellable (npc buy it from player) dont matter how much money I put like its price, Npc always display and pay for it 100gps.

I'm having this bug make months and I really cant find a solution. Any idea please?

Second: I wanna a script that display broadcast messages, like news and things like these, the problem is, the script im using now only display this message in red, but i wanted that this message appear in white, any idea pls?

here is the script im using, im bad with scripts, so i modificate one of global events (the script of clean):

LUA:
function onThink(interval, lastExecution, thinkInterval)
	doBroadcastMessage("Testing")
	return true
end

and there is a form to add more texts, to be sent like after 30 seconds of first message? so i could remove the other events and let only one event in globalevents to news.


Thank you everybody for oyu rattention!!
 
1. Post your NPC.

2.
Code:
function onThink(interval, lastExecution, thinkInterval)
        doBroadcastMessage("White Power _/", MESSAGE_STATUS_ADVANCE)
        addEvent(doBroadcastMessage, 30 * 1000, "Msg after 30 secs.", MESSAGE_STATUS_ADVANCE)
        return true
end
 
Message still appearing in red bro, the scripts work, but still appearing in red.

Soya script:

LUA:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Soya" script="data/npc/scripts/loot.lua" walkinterval="2000" floorchange="0">
	<health now="150" max="150"/>
	<look type="139" head="132" body="79" legs="97" feet="132" corpse="2212"/>
	<parameters>
		<parameter key="module_shop" value="1"/>
		<parameter key="message_greet" value="Hello |PLAYERNAME|. I buy swords, clubs, axes, helmets, boots, legs, shields and armors."/>
		<parameter key="shop_sellable" value="crown armor,2487,5000;royal helmet,2498,40000;warrior helmet,2475,6000;crusader helmet,2497,7000;crown helmet,2491,2000;devil helmet,2462,3000;mystic turban,2663,500;chain helmet,2458,35;iron helmet,2459,30;steel boots,2645,400000;boots of haste,2195,30000;golden boots,2646,100000;magic plate armor,2472,100000;dragon scale mail,2492,40000;demon armor,2494,90000;golden armor,2466,25000;knight armor,2476,5000;blue robe,2656,10000;amazon armor,2500,2500;plate armor,2463,400;brass armor,2465,200;chain armor,2464,100;golden legs,2470,80000;crown legs,2488,15000;knight legs,2477,6000;plate legs,2647,500;brass legs,2487,100;mastermind shield,2514,70000;demon shield,2520,30000;great shield,2522,100000;vampire shield,2534,15000;medusa shield,2536,6000;amazon shield,2537,4000;crown shield,2519,5000;tower shield,2528,4000;guardian shield,2515,200;beholder shield,2518,1500;dwarven shield,2525,100;giant sword,2393,10000;bright sword,2407,4000;ice rapier,2396,4000;fire sword,2392,3000;serpent sword,2409,1500;spike sword,2383,800;two handed sword,2377,400;broad sword,2413,70;short sword,2406,30;sword,2376,25;dragon lance,2414,10000;guardian halberd,2427,7500;fire axe,2432,10000;knight axe,2430,2000;double axe,2387,200;halberd,2381,200;battle axe,2378,100;hatchet,2388,20;war hammer,2391,6000;thunder hammer,2421,90000;skull staff,2436,1000;dragon hammer,2434,2000;clerical mace,2423,200;battle hammer,2417,60;mace,2398,30;"/>
	</parameters>
</npc>
 
Back
Top