mIRC Home    About    Download    Register    News    Help

Print Thread
#230896 24/03/11 11:28 AM
Joined: Mar 2011
Posts: 2
S
Bowl of petunias
OP Offline
Bowl of petunias
S
Joined: Mar 2011
Posts: 2
this is two alias that i'm using as identifiers

prevtok {
var %tok = $iif($prop,$prop,1)
return $gettok($2-,$calc($findtok($2-,$1,%tok,32) - 1),32)
}
nextok {
var %tok = $iif($prop,$prop,1)
return $gettok($2-,$calc($findtok($2-,$1,%tok,32) + 1),32)
}
exemple:
(IRPG) Saga` (Gemini No Saga) a atteint le level 15 !!! Prochain level dans 0 jours, 01:32:39.

the red part could have one or many world so
$nextok(level,$1-) return 15
$nextok(level,$1-).2 return dans


it may be help someone else or be implemented in mIRC

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
I'm a little confused as to what your suggestion is? You want props to be able to be used as token numbers? As you've shown, that's already possible.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
argv0 #230912 24/03/11 10:08 PM
Joined: Mar 2011
Posts: 2
S
Bowl of petunias
OP Offline
Bowl of petunias
S
Joined: Mar 2011
Posts: 2
I mean it would be $nextok(text,token,N,C) and $prevtok(text,token,N,C) in mIRC, to find next token or previous token

Last edited by SpeedBast; 24/03/11 10:15 PM.
Joined: Feb 2006
Posts: 546
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 546
see, the token identifiers native to mIRC are all relatively basic and fundamental operations that were deemed useful enough to be considered necessary additions. from these, we can combine them in pairs and add a splash of $calc() to form many other custom token identifiers that MAY be useful to SOME people. personally, i don't think your $nextok() and $prevtok() quite fit the bill - they seem best left as compound operations comprising the simpler and more general purpose $gettok / $findtok.

ask yourself, using $nextok and $prevtok, can we then combine them with other token identifiers to produce different and potentially useful functions? not to the extent offered by existing token identifiers.

i've had to script many functions that could be generalized as legitimate token identifiers ($scrambletok, and $wildtok + other token identifiers such as $wildremtok or $wildreptok come to mind), but i must accept that, while i found them quite necessary, others are unlikely to share my sentiments and they are best left as an exercise to scripters


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde

Link Copied to Clipboard