Hunter feedback and script

All about the past, current and future webteases and the art of webteasing in general.
---
Post Reply
mandarynkorian
Explorer
Explorer
Posts: 19
Joined: Tue Jan 07, 2020 5:57 pm
Gender: Male
Sexual Orientation: Straight

Hunter feedback and script

Post by mandarynkorian »

Hi all,

I'm probably not going to add any new feature to this tease but in case you would like to use it in some way or create your tease like this, here is a script you should put in init script

Code: Select all

//function for easy load
function Get(key){
  return teaseStorage.getItem(key) || 0
}

//easy save
function Set(key,value){
  teaseStorage.setItem(key, value)
}

//current task to do (encounterType)
var currentEncounterID = -1
//current monster HP (baseEncounterMonsterHP)
var currentEncounterHP = -1
//current monster type (encounterMonsterType)
var currentEncounterMonsterType = -1
var currentSound = -1

var accumulatedExpThisSession = 0
var cumType = -1

var encounterType =[ // what to do
  "timeStrokes",
  "metronome1-1",
  "metronome2-3",
  "metronome3-3",
  "metronomeFast",
  "edge",
  "holdEdge"
  ]
  
var cumTypeEnum = [
  "pussy",
  "ass",
  "boobs",
  "non nude"]
  
var encounterMonsterType = [ //monster name
  "Common",
  "Rare",
  "Unique",
  "Boss"]
  
var baseEncounterMonsterHP = [ //monster hp
  80,
  100,
  120,
  140]
  
var encounterSpawnPercentage = [ //percentage of spawn each type
  [80,100,111,111],//lvl 1
  [50,80,100,111],
  [35,70,90,100],
  [25,60,90,100],
  [20,60,80,100],
  [20,60,80,100]]//lvl 6
  
var encounterRandomLevel = [
  [25,50,70,95,100,111,111],//lvl 1
  [20,35,50,70,90,100,111],
  [10,20,45,60,80,95,100],
  [5,15,40,60,75,90,100],
  [5,10,30,50,70,85,100],
  [5,10,25,45,65,80,100]]  //lvl 6
  
  
//1st column - number of strokes
//2,3,4,5 - speed of metronome
//6,7 - no differen,e just edge
var baseDifficulty = [ 
  [30,0,0,0,0,0,0],//lvl 1
  [30,1,1,0,0,0,0],
  [40,2,1,1,0,0,0],
  [50,3,2,1,1,0,0],
  [60,3,2,2,1,0,0],
  [70,3,3,2,2,0,0]]//lvl 6
  
//user deal less hitpoints on higher lvl  
var baseHitEnemyHP = [
  [30,40,50,60,100,100,100],//lvl 1
  [25,35,40,50,80,100,100],
  [20,30,35,50,70,80,80],
  [15,25,30,40,60,70,70],
  [15,25,25,25,50,65,65],
  [10,20,20,20,40,45,45]]//lvl 6
  
//experience is increased in higher lvl
var experienceGet = [
  [5,6,6,6,7,100,100],//lvl 1
  [8,10,10,11,12,100,100],
  [13,15,15,18,20,22,25],
  [15,16,20,20,25,25,30],
  [15,20,22,22,28,30,35],
  [15,24,26,26,32,35,40]] //lvl 6

//experience needed to lvl up
var levelExp = [
  50,//lvl 1
  100,
  300,
  800,
  1500,
  2800//lvl 6
  ]
//gets type to cum from list  
function GetCumType(){
  var rand = GetRandom();
  if(rand <= 25){
    cumType = 0
  }
  
  if(rand > 25 && rand <=50){
    cumType = 1
  }
  
   if(rand > 50 && rand <=75){
    cumType = 2
  }
  
  if(rand >75){
    cumType = 3
  }
}
  
//return 1 if user is allowed to end tease
function ChanceToGetRelease(){
  
  if(accumulatedExpThisSession < 500){
    return 0
  }
  if(accumulatedExpThisSession>= 500 && accumulatedExpThisSession < 700 && GetRandom() > 70)
    return 1
  if(accumulatedExpThisSession>= 700 && accumulatedExpThisSession < 1100 && GetRandom() > 60)
    return 1
  if(accumulatedExpThisSession>= 1100 && accumulatedExpThisSession < 5000 && GetRandom() > 40)
    return 1
    
  return 0
}  
  
//check if should play moaning. based on enemy type
function ShouldPlayMoaning(){
  var random = GetRandom()
  switch(currentEncounterMonsterType)
  {
    case 0: 
      if(random > 90)
        return true
      break
    case 1: 
      if(random > 80)
        return true
      break
    case 2: 
      if(random > 50)
        return true
      break
    case 3: 
      if(random > 30)
        return true
      break
  }
}
//pick mian sound
function PickSound(){
   var random = GetRandom()
   currentSound = random % 6
}
 // return monster name
function GetMonsterInfo(){
 return encounterMonsterType[currentEncounterMonsterType]
}  
//generates random 1-100
function GetRandom(){
 return Math.floor((Math.random() * 100) + 1);
}
  
//set next monster type with full hp
function SetNextMonsterType(){
   var random = GetRandom()
   var list = encounterSpawnPercentage[GetLevel()-1]
   for(var i = 0; i < list.length; i++) {
      if(random <= list[i]){
        currentEncounterMonsterType = i
        currentEncounterHP = baseEncounterMonsterHP[i]
        console.log("Next monster: "+encounterMonsterType[i]+" difficulty: "+GetDifficulty())
        return
      }
    }
}
  
//return current difficulty based on level and randomized encounter (SetNextEncounter)  
function GetDifficulty(){ 
  var level = GetLevel()
  
  if(currentEncounterMonsterType===0 && level>0 && GetRandom() > 50)
    level = Changelevel(level, -1)
    
  if(currentEncounterMonsterType===1 && level>0 && GetRandom() > 70){
    level = Changelevel(level, -1)
  }
  
  if(currentEncounterMonsterType===1 && level<5 && GetRandom() > 70){
    level = Changelevel(level, 1)
  }
  
  if(currentEncounterMonsterType===2 && level>0 && GetRandom() > 60){
    level = Changelevel(level, -1)
  }
  
  if(currentEncounterMonsterType===2 && level<5 && GetRandom() > 80){
    level = Changelevel(level, 1)
  }
    
  if(currentEncounterMonsterType==3 && level<5 && GetRandom() > 50)
    level = Changelevel(level, 1)
    
  if(currentEncounterMonsterType==3 && level>2 && GetRandom() > 90)
    level = Changelevel(level, -2)
    
  var difficulty = baseDifficulty[level-1][currentEncounterID]
  return difficulty
} 

function Changelevel(level,toChange){
  level = level + toChange
  if(level<= 0)
    level = 1
  else if (level > 5)
    level = 5
  return level
}

//set next task to do
function SetNextEncounter(){
  var random = GetRandom()
 var list = encounterRandomLevel[GetLevel()-1]
 for(var i = 0; i < list.length; i++) {
    if(random <= list[i]){
      currentEncounterID = i
      console.log("next encounter: "+encounterType[i])
      return
    }
  }
}

//after completing task, hit monster
function HitEnemy(){
  var level = GetLevel()
  var toHit =baseHitEnemyHP[level-1][currentEncounterID]
  currentEncounterHP = currentEncounterHP - toHit
  console.log("HIT: "+toHit+" "+"HP left: "+currentEncounterHP)
  return toHit
}

//gets current monster hp
function GetMonsterHP(){
  if(currentEncounterHP< 0)
    return 0
  return currentEncounterHP
}

//add exp based on enemy and level
function AddExp(){
  var expToAdd = experienceGet[GetLevel()-1][currentEncounterID]
  PrintLevel()
  Set("exp",Get("exp")+expToAdd)
  accumulatedExpThisSession = accumulatedExpThisSession + expToAdd
  return expToAdd
}

function LoseExp(number){
  var tmpExp = Get("exp")
  if(tmpExp > 500)
    tmpExp = tmpExp-500
  else 
    tmpExp = 0
   Set("exp",tmpExp)
}

function PrintLevel(){
  return "You are on level "+GetLevel()+" EXP: "+Get("exp")+"/"+GetExpToNextLevel()
}

//get user level
function GetLevel(){
  for(var i = 0; i < levelExp.length; i++) {
    if(Get("exp") < levelExp[i])
     {
      return i+1
     }
  }
  return 6//max
}

function GetExpToNextLevel(){
  for(var i = 0; i < levelExp.length; i++) {
    
    if(Get("exp") < levelExp[i])
     {
      return levelExp[i]
     }
  }
  return 2800 //max
}
After that the tease is pretty straighforward. "Hunt" page is a list of few commands with timers


Pseudocode which you should click out

Code: Select all

1. If - (currentEncounterMonsterType == -1 || GetMonsterHP() <= 0) 
    Then
        SetNextMonsterType()
        GetDifficulty()
2.Eval - SetNextEncounter()
3.If - shouldPlayMoaning()
    Then
        Eval - -PickSound()
        If -currentSound ===0
        Then
            //Play sound
        //Check next sound up to 5
4. If currentEncounterID === 0
    Then
    //Do x stroking
5. If currentEncounterID === 1
    Then
    If GetDifficulty() === 0
    //Play slow sound
    If GetDifficulty() === 1
    //Play faster sound
    ...
//There are 6 encounters here, see the tables in code
6. Eval - HitEnemy()
    AddExp()
7. If - GetMonsterHP() > 0
    Then
    GoTo - hunt //go back to get new encounter
8.If - ChanceToGetRelease() === 1 || Get("exp") > 2800
    Then
        Eval - GetCumType()
        If - you like to cum?
        Then
            GoTo - cum page
        If - cumType === 0
        Then
            //End with something
        If - cumRype === 1
        Then
            //Other
      Else
          GoTo - city
I'm not sure if it's possible to share full tease, but if you would like to, I can export it and send in private
User avatar
Clockgol
Explorer
Explorer
Posts: 7
Joined: Sat Dec 23, 2017 7:58 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch

Re: Hunter feedback and script

Post by Clockgol »

I'm encountering an error where it spawns me at Level 6 with 2820/2800 EXP. I've hit reset and no at the start, both start me there for some reason. Any ideas?
Adrast
Explorer
Explorer
Posts: 13
Joined: Fri Mar 25, 2016 4:52 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Submissive

Re: Hunter feedback and script

Post by Adrast »

Apparently level 6 is the maximum. I can assume that there is an error in the code due to which the player starts from the maximum level with the maximum experience. No matter how the game starts. As a result of this error, the player cannot lose or gain experience or level.
User avatar
Clockgol
Explorer
Explorer
Posts: 7
Joined: Sat Dec 23, 2017 7:58 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch

Re: Hunter feedback and script

Post by Clockgol »

Unfortunately, the player can not win either since the amount of EXP is above the maximum amount and doesn’t count, therefore it still doesn’t let you cum that way.
Roblsforbobls
Explorer At Heart
Explorer At Heart
Posts: 272
Joined: Tue May 21, 2019 2:27 am
Gender: Male
Sexual Orientation: Asexual
I am a: Switch

Re: Hunter feedback and script

Post by Roblsforbobls »

It looks like there is an eval on the "City-1" page that sets the player's experience to 2820. If that action is disabled, the tease functions as intended. It was probably meant to be debug tool that was left in by mistake. Aside from that, amazing job with this, mandarynkorian! I'll be studying your code as I'm still learning how to make functions like you did. Thank you for sharing! :-D
User avatar
Clockgol
Explorer
Explorer
Posts: 7
Joined: Sat Dec 23, 2017 7:58 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch

Re: Hunter feedback and script

Post by Clockgol »

Yes, that’s probably it. The worst part is, it was working fine early that day when I was checking it out! Then I came back to it later and it was all broken like that.
mandarynkorian
Explorer
Explorer
Posts: 19
Joined: Tue Jan 07, 2020 5:57 pm
Gender: Male
Sexual Orientation: Straight

Re: Hunter feedback and script

Post by mandarynkorian »

Hi all, thanks for finding it.
Should be all working now
Triple Alfa
Explorer At Heart
Explorer At Heart
Posts: 175
Joined: Wed Dec 05, 2007 12:35 pm

Re: Hunter feedback and script

Post by Triple Alfa »

Could I ask you how you made your metronome/beats sounds? They sound really good.
I've looked around the web in the past, but never found anything good.
niceguy
Explorer
Explorer
Posts: 13
Joined: Thu Oct 10, 2013 10:52 pm

Re: Hunter feedback and script

Post by niceguy »

Possible bug... Whenever I select "No, I will continue with my journey" (after "Enemy is Weakened, do you want to cum?" it kicks me all the way back to the City, even if I'd been hunting the Village or Metropolis.
Post Reply