https://sureai.net/forum/viewtopic.php?t=309
Begin RohstoffErzaderScript
Short Chance
If (MenuMode ==1)
return
endif
if ( GetDistance, player > 300 )
return
endif
Short Chance
Set Chance to Random, 101
if ( OnActivate == 1 )
if ( Player->GetItemCount "WerkzeugSpitzhacke01" >= 1 )
if (Chance >= 20)
playsound "rocks8"
playsound "rocks7"
playsound "item misc up"
MessageBox "Du hast Erz abgebaut"
player->AddItem"Erz02",1
else
playsound "rocks8"
playsound "rocks7"
playsound "item misc up"
MessageBox "Du hast Erz abgebaut!"
player->AddItem"Erz01",1
endif
endif
endif
End
Begin RohstoffDiamantaderScript
short Tage
short TageVergangen
short Frame
If (MenuMode==1)
return
endif
if ( Frame <= 10 )
Set Frame to Frame + 1
return
else
Set Frame to 0
endif
if ( getdisabled == 1 )
if ( Tage == dayspassed )
return
else
set TageVergangen to dayspassed - Tage
endif
if ( TageVergangen < 30 )
return
else
set TageVergangen to 0
enable
endif
endif
if ( GetDistance, player > 300 )
return
endif
if ( OnActivate == 1 )
if ( Player->GetItemCount "WerkzeugSpitzhacke01" >= 1 )
playsound "rocks8"
playsound "rocks7"
Playsound "item misc up"
player->AddItem"Diamant01", 1
MessageBox "Du hast Diamant gefördert"
set Tage to dayspassed
disable
endif
endif
End