PenUltima Online

It is currently Fri Sep 05, 2008 2:05 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: autoloop
PostPosted: Wed Jun 11, 2008 2:47 pm 
Offline

Joined: Sat Aug 04, 2007 6:53 pm
Posts: 8
Location: http://www.freewebs.com/zuluscripts95/
how do i stop the script
const al_consecutive := 0; // number of consecutive items before a anti-macroer gump appears to ask to continue
const al_timeout := 15; // number of seconds the player has to press "continue"

any help plz


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 12, 2008 8:33 am 
Offline

Joined: Fri Jun 06, 2008 1:10 pm
Posts: 12
change include/autoloop.inc and cmdtxt/player/autoloop.src

i think


Top
 Profile  
 
 Post subject: autoloop
PostPosted: Wed Jun 18, 2008 9:18 am 
Offline

Joined: Sat Aug 04, 2007 6:53 pm
Posts: 8
Location: http://www.freewebs.com/zuluscripts95/
HMMM i still cant seem to take "continue" out im trying to have autoloop like 2000 but without the "continue" after 10 loops


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 18, 2008 10:08 am 
Offline
User avatar

Joined: Fri Feb 10, 2006 12:15 am
Posts: 209
Say what?

I think I could help you out - if only were you capable of share the script you need help with.


Top
 Profile  
 
 Post subject: autoloop
PostPosted: Wed Jun 18, 2008 10:22 am 
Offline

Joined: Sat Aug 04, 2007 6:53 pm
Posts: 8
Location: http://www.freewebs.com/zuluscripts95/
sorry my bad gere is the script



// AutoLoop.inc by Lapo 'Aspox' Luchini <lapo>

/*
** AutoLoop_init asks character how many time it wants to iterate
** [if "autoloop" CProp is set it doesn't ask but uses that value, unless is 0]
** AutoLoop_more retunrs the number of loops remaining
**
** Use like this (for a crafter-like skill):
**
** AutoLoop_init(who);
** while(AutoLoop_more()>0 && <material_not_finished>)
** <create_item>;
** endwhile
** AutoLoop_finish();
*/

use uo;
include "include/random";

const AL_consecutive := 10; // number of consecutive items before a anti-macroer gump appears to ask to continue
const AL_timeout := 15; // number of seconds the player has to press "continue"

var AL_number := 0;
var AL_remain := 0;
var AL_char;
var AL_delay;
var AL_charX;
var AL_charY;
var AL_setting;

// init the autoloop variables
function AutoLoop_init( character, max := 10000, delay := 6 )

AL_setting := CInt( GetObjProperty( character, "autoloop" ) );
if( !AL_setting )
SetObjProperty ( character, "autoloop", 0 );
AL_setting := 0;
endif

if( AL_setting = 0 )
AL_number := CInt( SendTextEntryGump(character, "How many loops? [0-"+max+"]", TE_CANCEL_ENABLE, TE_STYLE_NORMAL, 4));
else
AL_number := AL_setting;
endif

if( !AL_number )
AL_number := 0;
elseif( AL_number > max )
AL_number := max;
endif

AL_remain := AL_number;
AL_char := character;
AL_charX := AL_char.x;
AL_charY := AL_char.y;
AL_delay := delay;

endfunction


// he numer returned is the number of things STILL to do, use BEFORE creating, not after
function AutoLoop_more()

if( (AL_charX = AL_char.x) && (AL_charY = AL_char.y) )
if( AL_remain > 0 )
if( AL_remain != AL_number )
Sleep( AL_delay );
if( (AL_number - AL_remain) % AL_consecutive = 0)
if( !TimedYesNo(AL_char) )
AL_remain := -1;
AL_number := 0; // to print "looping aborted"
endif
endif
endif
if( AL_remain > 0 )
SendSysMessage( AL_char , "Looping [" + AL_remain + " more to go].", 3 , 89 );
AL_remain := CInt( AL_remain ) - 1;
endif
else
AL_remain := -1;
endif
else
SendSysMessage( AL_char , "You moved." , 3 , 89 );
AL_remain := -1;
AL_number := 0; // to print "looping aborted"
endif

return( AL_remain+1 );

endfunction


// to be used after all, to clean up the variables and print the finishing text
function AutoLoop_finish()

if( (AL_remain <0> AL_timeout)
SendSysMessage( who, "You waited too long to decide.", 3, 89 );
return( 0 );
elseif( res )
return( 1 );
else
return( 0 );
endif
*/

return(1);

endfunction


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

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl