Getting a players name?

Ask for help

Moderators: Murderator+, Murderator

Post Reply
hailstorm
Posts: 3
Joined: 2004-04-20 17:09:45

Getting a players name?

Post 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
Yoko
Site Admin
Posts: 1964
Joined: 2004-04-03 16:49:38
Contact:

Post 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)
totus
Posts: 48
Joined: 2004-04-17 23:02:41
Location: Odessa, Ukraine
Contact:

Маленькая ф-ция.

Post 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
...thinking - 37% complete...
hailstorm
Posts: 3
Joined: 2004-04-20 17:09:45

Post by hailstorm »

thanks for the replies yoko and totus
but sorry totus im not good enuf to understand your one :P
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
totus
Posts: 48
Joined: 2004-04-17 23:02:41
Location: Odessa, Ukraine
Contact:

Just Think!

Post by totus »

'laststatus' is not equal to 'LastStatus' :)

That's the answer :)

Искренне Ваш, Тотус Маньяковски.
...thinking - 37% complete...
hailstorm
Posts: 3
Joined: 2004-04-20 17:09:45

Post by hailstorm »

ok either i dont get wot u mean which is probly true or u dont get wot i mean :P

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?
totus
Posts: 48
Joined: 2004-04-17 23:02:41
Location: Odessa, Ukraine
Contact:

Everything is simple.

Post by totus »

UO.Say(UO.GetName(UO.GetSerial('lasttarget'))+' hello...')
---
,exec function

Искренне Ваш, Тотус Маньяковски.
...thinking - 37% complete...
Yoko
Site Admin
Posts: 1964
Joined: 2004-04-03 16:49:38
Contact:

Post by Yoko »

standart procedure not get player names on some shards
also make sure Track World is enabled
Post Reply