Jump to content

Job Script Help pls


paddy1180

Recommended Posts

on *:SIGNAL:mta.command:{ 
elseif $3 == !job 
if $rpg.area($1,$2) == Malibu-Club { 
mta.msg $1 $2 Job Completed. You got 987 ! 
!writeini -n " $+ $rpg.dir $+ rpg.ini" $mta.name($1,$2) cash 987 
         } 
         else mta.msg $1 $2 Go to the Malibu-Club In Whasington Beach ! 
         }

This Script has got alot of bugs. when you start with 0 cash and you do the job you get 987, when you try to do it again it says you got 987 but you didnt, your cash stays the same. also after doing the job once, when you type any other commands like !cash it comes up with Job Completed ..... 987 but i havent even typed !job can anyone help me

Link to comment

hmm, maybe like that:

on *:SIGNAL:mta.command:{
 if ($3 == !job) {
   if (Malibu-Club isin $rpg.area($1,$2)) {
     if ($readini($scriptdir $+ Job.ini,$mta.name($1,$2),MalibuMission1Done) == 0) {
       mta.msg $1 $2 Job Completed. You Got 987 !
       !writeini -n " $+ $rpg.dir $+ Job.ini" $mta.name($1,$2) MalibuMission1Done 1
       !writeini -n " $+ $rpg.dir $+ rpg.ini" $mta.name($1,$2) cash $calc($readini($rpg.dir $+ rpg.ini,$mta.name($1,$2),cash) + 987) 
     }
     else mta.msg $1 $2 Job Allready Done!
   }
   else mta.msg $1 $2 Go to the Malibu-Club In Whasington Beach ! 
 }
} 

Link to comment

try that then

on *:SIGNAL:mta.command:{
 if ($3 == !job) {
   if (Malibu-Club isin $rpg.area($1,$2)) {
     if ($readini($scriptdir $+ Job.ini,$mta.name($1,$2),MalibuMission1Done) != 1) {
       mta.msg $1 $2 Job Completed. You Got 987 !
       !writeini -n " $+ $rpg.dir $+ Job.ini" $mta.name($1,$2) MalibuMission1Done 1
       !writeini -n " $+ $rpg.dir $+ rpg.ini" $mta.name($1,$2) cash $calc($readini($rpg.dir $+ rpg.ini,$mta.name($1,$2),cash) + 987)
     }
     else mta.msg $1 $2 Job Allready Done!
   }
   else mta.msg $1 $2 Go to the Malibu-Club In Whasington Beach !
 }
}

Link to comment

man, if i was you i'd have it done like this:

on *:SIGNAL:mta.command:{
 if ($3 == !job) {
   if (!$readini($rpg.dir $+ Job.ini,$mta.name($1,$2),job)) {
     if ($readini($scriptdir $+ Job.ini,$mta.name($1,$2),MalibuMission1Done) != 1) {
       mta.msg $1 $2 You need reach the Malibu-Club in Washington Beach for 1 minute
       !writeini " $+ $rpg.dir $+ Job.ini" $mta.name($1,$2) job $ctime
       .timer 1 60 job.fail $1 $2
     }
     else mta.msg $1 $2 Job Allready Done!
   }
   else mta.msg $1 $2 You already have a job! You have $duration($calc(60 - $calc($ctime - $readini($rpg.dir $+ Job.ini,$mta.name($1,$2),job)))) left.
 }
 elseif ($3 == !here) {
   if ($readini($rpg.dir $+ Job.ini,$mta.name($1,$2),job)) {
     if (Malibu-Club isin $rpg.area($1,$2)) {
       mta.msg $1 $2 Job Completed. You Got 987 !
       !writeini -n " $+ $rpg.dir $+ Job.ini" $mta.name($1,$2) MalibuMission1Done 1
       !writeini -n " $+ $rpg.dir $+ rpg.ini" $mta.name($1,$2) cash $calc($readini($rpg.dir $+ rpg.ini,$mta.name($1,$2),cash) + 987)
     }
     else mta.msg $1 $2 Go to the Malibu-Club In Washington Beach !
   }
   else mta.msg $1 $2 You dont have a job. Type !job to get one.
 }
}
alias job.fail {
 !remini " $+ $rpg.dir $+ Job.ini" $mta.name($1,$2) job
 mta.msg $1 $2 Job Failed! Out of time
}

Link to comment

i know iv been asking alot but im trying to learn how to script and i wrote this script myself but when i type !cars nothing happens but whe i type any command starting with ! it comes up with you own cars.

on *:SIGNAL:mta.command:{ 
 if ($3 == !cars){ 
 if ($readini($script.dir $+ RPG.ini,$mta.name($1,$2),cars)!= $null){ 
 mta.msg $1 $2 You have no cars ! 
} 
else mta.msg You own car/s 
} 
}

thanks

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...