Page 1 of 1
Getting a players name?
Posted: 2004-04-20 17:12:26
by hailstorm
hello
how would i go about gettin a players name for example
how would i target a player, and then tell whether he says Hello in the journal? but only that player
like UO.InJournal('PLAYERNAME: hello')
?
thanks
Posted: 2004-04-20 22:55:50
by Yoko
exactly as you said
if uo.injournal(uo.getname("lasttarget")+": hello") then
the only problem is comparation case sensitive (MURDER not equal MurDer)
Маленькая ф-ция.
Posted: 2004-04-20 23:07:08
by totus
cMsg - message, you wanna check.
mAuthor - nick or ID of the player, this message would be from...
Code: Select all
sub CheckMsg(cMsg, mAuthor)
if IsNumber(mAuthor) then
mAuthor = UO.Int2Hex(VAL(STR(mAuthor)))
endif
var ij
ij = UO.InJournal(cMsg)
if ij Then
if ((UO.JournalSerial(ij-1) == mAuthor) or (UO.GetName(UO.JournalSerial(ij-1)) == mAuthor)) then
return ij
else
if (mAuthor == 'System') and (UO.JournalSerial(ij-1) == '0x01010101') then
return ij
else
return 0
endif
endif
else
return 0
endif
end sub
Posted: 2004-04-21 04:37:16
by hailstorm
thanks for the replies yoko and totus
but sorry totus im not good enuf to understand your one
i tried UO.Say(UO.GetName("LastTarget")+": hello")
and i dont thinkt hat said anything at all or it might of jus said hello
then i tried UO.Say(UO.GetName('LastTarget')+": hello")
but all my guy says is *hello*
anyone help?
thanks
Just Think!
Posted: 2004-04-21 05:51:32
by totus
'laststatus' is not equal to 'LastStatus'
That's the answer
Искренне Ваш, Тотус Маньяковски.
Posted: 2004-04-21 05:58:50
by hailstorm
ok either i dont get wot u mean which is probly true or u dont get wot i mean
i have UO.Say(UO.GetName("lasttarget")+": hello")
which i think? should make my character say Bob(characters name of my last target): hello
but it just says *hello* with the asterickes
thankz
oh and is there a command to run a script?
like ,runscript heal
etc?
Everything is simple.
Posted: 2004-04-21 19:27:42
by totus
UO.Say(UO.GetName(UO.GetSerial('lasttarget'))+' hello...')
---
,exec function
Искренне Ваш, Тотус Маньяковски.
Posted: 2004-04-23 21:58:25
by Yoko
standart procedure not get player names on some shards
also make sure Track World is enabled