Yoko

All sides of Injection
It is currently 2025-12-13 15:52:53

All times are UTC+02:00




Post new topic  Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Locations Names ?
PostPosted: 2009-03-20 23:30:51 
Offline

Joined: 2009-03-20 23:20:28
Posts: 5
Hello, i was wondering if i can get a variable with the name of the zone i am. I dont need X and Y, just the name... for example, Despise, Destard, Britain... Etc.

Thanks in advance.


Top
   
 Post subject:
PostPosted: 2009-03-20 23:54:17 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
.where

it works ?

_________________
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Skype: d119060


Top
   
 Post subject:
PostPosted: 2009-03-21 00:14:29 
Offline

Joined: 2009-03-20 23:20:28
Posts: 5
lol! i know that. But i want use the location for guild warning.... i mean: .g HELP IM IN (LOCATION) :P


Top
   
 Post subject:
PostPosted: 2009-03-21 00:32:55 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
need no help? - ok, only little hint -)

use .where, grab message from journal, then send guild warning.

Injection have no special command for u.

_________________
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Skype: d119060


Top
   
 Post subject:
PostPosted: 2009-03-21 00:33:57 
Offline

Joined: 2009-03-20 23:20:28
Posts: 5
ahh, you'r right, never thinked it. Thanks :)


Top
   
 Post subject:
PostPosted: 2009-03-21 06:12:27 
Offline

Joined: 2009-03-20 23:20:28
Posts: 5
Hi again, just wanna show you how my script is. Maybe you can help me improve it, but at the moment it does the job fine. Don't be evil with me, is my 1st script :P.

Code:
#AVISO GUILD

sub Aviso()
VAR p='N/A'
VAR x=UO.GetZ()
UO.DeleteJournal()
UO.sayu('.where')
wait(500)
if UO.InJournal('I am in') then
   p=UO.Journal(0)
   p=Mid(trim(p), 10+len('mTr'), 100)
   UO.sayu(',resend')
endif
if x>200 then
   UO.sayu('.gsay HELP | AYUDA @ ' + Left(p, len(p)-15))
endif
if x==0 then
   UO.sayu('.gsay HELP | AYUDA @ ' + Left(p, len(p)-11))
endif
if x<230 and x>9 then
   UO.sayu('.gsay HELP | AYUDA @ ' + Left(p, len(p)-14))
endif
if x>0 and x<10 then
   UO.sayu('.gsay HELP | AYUDA @ ' + Left(p, len(p)-13))
endif
end sub


All this repetitions is for checking Z and do the conversion of the string removing the cords, but still works with a bit of delay cause server don't send Z at every move (i think) and even with resend it fails sometimes. Is it there a better way to check it ? I tested with else's, but i dont know why isnt working with. so I had to use 4 if's.

Oh, btw, change 'mTr' with your name.


Top
   
 Post subject:
PostPosted: 2009-03-21 16:59:10 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
Code:
sub aviso()
   var loc, msg = 'I am in '
   deljournal( msg )
   uo.msg( '.where' )
   repeat
      wait( 100 )
   until uo.injournal( msg )
   loc = uo.journal( uo.injournal( msg ) -1 )
   loc = explode( loc, msg, 1 )
   loc = explode( loc, ' (', 0 )
   uo.msg( '.gsay HELP | AYUDA @ ' + loc )
endsub


Its may be better.

PS: sub explode: viewtopic.php?p=55737#55737

PPS: I was asked about .where because on some shards this command isnt works.

_________________
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Skype: d119060


Top
   
 Post subject:
PostPosted: 2009-03-21 18:28:26 
Offline

Joined: 2009-03-20 23:20:28
Posts: 5
ooh, i forgot explode :P I come from php and c# so in both work this function :) but didnt know it was in c++ too. Still a newbie on it hehehe.

Thanks for you help man.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 8 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited