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

Nick gracza w rozmowie z npc (potrzebuje pomocy)

Status
Not open for further replies.

Nerkoerko

Banned User
Joined
Feb 28, 2009
Messages
402
Reaction score
5
Location
Polska
Witam robiłem właśnie npcki jak na rl ;ppp
i w tym zdaniu npc mowi
npcHandler:say("From now on, you shall be known as Player, the bear warrior. You shall be strong and proud as Angros, the great dark bear. He shall guide your path.", cid)

nie wiem jak zrobic zeby pisal ncik gracza probowalem local nick = get cos tam
i w tekscie dodac '.. nick ..' ale nie dziala
 
Example ^^
LUA:
<parameter key="message_greet" value="Hello |PLAYERNAME|. I sell runes, potions, wands and rods."/>

Czyli w Twoim przypadku:
LUA:
npcHandler:say("From now on, you shall be known as |PLAYERNAME|, the bear warrior. You shall be strong and proud as Angros, the great dark bear. He shall guide your path.", cid)
 
jak robisz w lua to jak masz text między
"" to musisz " .. funkcja .."

jeśli masz tekst między ''
to zrób ' .. funkcja .. '

Jak widzę Ty masz między ""
więc zrób:

"Witaj drogi " .. getPlayerName(cid) .. ", co tam u Ciebie?"

Jeśli masz to w xml to
|PLAYERNAME|
 
Dzięki jakoś sobie poradziłem użyłem local nick= getplayernamecid a w tekscie ".. nick .."
 
Dzięki jakoś sobie poradziłem użyłem local nick= getplayernamecid a w tekscie ".. nick .."
Nie praktyczne, bo jeśli używasz npcHandler to lepiej użyć aliasu, czyli "|PLAYER|".
 
Status
Not open for further replies.
Back
Top