Yoko
http://forum.yoko.com.ua/

Getting a players name?
http://forum.yoko.com.ua/viewtopic.php?f=3&t=146
Page 1 of 1

Author:  hailstorm [ 2004-04-20 17:12:26 ]
Post subject:  Getting a players name?

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

Author:  Yoko [ 2004-04-20 22:55:50 ]
Post subject: 

exactly as you said
if uo.injournal(uo.getname("lasttarget")+": hello") then

the only problem is comparation case sensitive (MURDER not equal MurDer)

Author:  totus [ 2004-04-20 23:07:08 ]
Post subject:  Маленькая ф-ция.

cMsg - message, you wanna check.
mAuthor - nick or ID of the player, this message would be from...
Code:
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

Author:  hailstorm [ 2004-04-21 04:37:16 ]
Post subject: 

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

Author:  totus [ 2004-04-21 05:51:32 ]
Post subject:  Just Think!

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

That's the answer :)

Искренне Ваш, Тотус Маньяковски.

Author:  hailstorm [ 2004-04-21 05:58:50 ]
Post subject: 

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?

Author:  totus [ 2004-04-21 19:27:42 ]
Post subject:  Everything is simple.

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

Искренне Ваш, Тотус Маньяковски.

Author:  Yoko [ 2004-04-23 21:58:25 ]
Post subject: 

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

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/